home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / docs / ascii / internet / userman / userman.doc
Encoding:
Text File  |  1995-10-10  |  186.4 KB  |  3,810 lines

  1.  
  2.  
  3.  
  4.                       The KA9Q Internet Software Package
  5.  
  6.                              Preliminary Version
  7.  
  8.                                January 20, 1988
  9.  
  10.                                       by
  11.  
  12.                              Bdale Garbee, N3EUA
  13.  
  14.                              using material from
  15.  
  16.                                Phil Karn, KA9Q
  17.                              Brian Lloyd, WB6RQN
  18.  
  19.                        and suggestions from many others
  20.  
  21.  
  22.           Copyright 1988 by Bdale Garbee, Phil Karn and Brian Lloyd.
  23.                              All Rights Reserved.
  24.  
  25.                   This Document may be reproduced in whole
  26.                  or in part for any non-commercial purpose,
  27.                    as long as credit is given the authors.
  28.  
  29. 1.  Background and Overview
  30.  
  31. 1.1.  What's TCP/IP All About?
  32.  
  33. Charles Hedrick of RUTGERS, the State University of New Jersey, has written  a
  34. very important document... a description of the "world of TCP/IP" that manages
  35. to be both a reasonable introduction for the non-technical or mildly technical
  36. individual,  and an excellent starting point for anyone interested in learning
  37. more about  the  family  of  networking  protocols  commonly  referred  to  as
  38. "TCP/IP".
  39.  
  40. The only difficulty with this document for those who are trying to learn  more
  41. about TCP/IP in the Amateur Radio "Packet" environment, is that the experience
  42. Mr. Hedrick works from is almost entirely with the wired  networks  common  in
  43. universities  and  businesses,  where  various  computer systems are networked
  44. together using some form of wire (usually coaxial cable  as  in  Ethernet,  or
  45. fiber optic cabling as in Pronet).
  46.  
  47. The individual who is familiar with radio transmission will  easily  recognize
  48. differences  between  the  wired environment and the on-air environment.  This
  49. does not mean that the protocols are unfit for use on the air, it simply means
  50. that  we  need to be careful when *implementing* the protocols in software for
  51. use on the radio that we don't make assumptions that aren't valid on the  air!
  52. In  particular,  wired  networks allow the assumption that every host can hear
  53. every other host on the wire... quite unlike the  situation  in  radio,  where
  54. one-way propagation paths are often the norm.
  55.  
  56. Mr. Hedrick mentions several protocols that can "ride on top of" IP,  such  as
  57. Sun's Network File System, NFS.  Some of the applications that he talks about,
  58. including NFS, while wonderful on wired networks,  are  somewhat  unreasonable
  59. for  packet  radio  until or unless we have *much* higher speed modems.  Wired
  60. networks can easily run at 10 million bits per  second,  while  packet  ranges
  61. from  300  bits  per second on HF, to perhaps 56 thousand bits per second with
  62. the WA4DSY modems on UHF.  Therefore, some of the protocols such as  NFS  that
  63. like  to eat lots of network bandwith won't be as neat on current packet radio
  64. as they are on current wired networks, but they certainly provides a  dramatic
  65. improvement in potential services for the "next generation" of packet radio.
  66.  
  67. The KA9Q Internet Package is currently the most common  TCP/IP  implementation
  68. (if  not the only one!) in use on Amateur Packet Radio.  The software supports
  69. the IBM PC and clones, the Apple Macintosh, the Commodore Amiga, and both  BSD
  70. and  System 5 Unix variants.  The package provides IP, ICMP, TCP, UDP, and ARP
  71. as basic services, and implements the  FTP,  Telnet,  and  SMTP  protocols  as
  72. applications.   The  package also includes a separate mail user interface pro-
  73. gram by N3EUA called BM, and software from WA3PXX  for  forwarding  PBBS  mail
  74. over  TCP.   An  associated  set  of software packages provide replacement ROM
  75. firmware for several TNC's, allowing them to be  used  with  the  KA9Q  TCP/IP
  76. Package.   At least two commercial manufacturers, AEA and Kantronics, now sup-
  77. port the KISS protocol in their TNC's, making them usable with TCP/IP.
  78.  
  79. Charles Hedrick's excellent introduction to TCP/IP can be found  in  the  same
  80. place  you found this document, named TUTORIAL.DOC. If you're new to all this,
  81. go find and read that before you get too wound up in the bits...
  82.  
  83. 1.2.  What's In the KA9Q Package
  84.  
  85. This is an overview of the various modules making up the  KA9Q  Amateur  Radio
  86. Internet  Protocol  package. Each section first describes the protocol that is
  87. supported, followed by a description of the implementation.
  88.  
  89. 1.2.1.  Subnet Layer
  90.  
  91. 1.2.1.1.  Standard 10 megabit Ethernet
  92.  
  93. The driver provided is for the 3-Com 3C500 (IE) controller for the PC.   Tight
  94. assembler  loops  are  used  instead of DMA for copying data in and out of the
  95. controller's buffer; this seems fast enough.  Only the receiver  is  interrupt
  96. driven; incoming packets are placed on a queue which is then emptied at a more
  97. leisurely pace by the  main  loop  code.   Since  Ethernet  is  so  fast,  the
  98. transmitter  routine  busy-waits  for completion. The IE controller has only a
  99. single buffer which is shared between receive and transmit. Packets  occasion-
  100. ally  get  lost  under heavy load, especially when several TCP connections are
  101. active at once and/or the TCP receive window sizes are  larger  than  the  MSS
  102. values.  This  is  very  hard to fix without going to a newer, more reasonably
  103. designed controller.
  104.  
  105. 1.2.1.2.  Serial Line IP (SLIP)
  106.  
  107. SLIP is a very simple technique for sending Internet Datagrams across ordinary
  108. asynchronous  lines  (e.g., modems). Its only function is to delimit datagrams
  109. with framing characters, which are "byte stuffed" for transparency.  No  error
  110. checking  is  provided;  the  checksums  that  are part of IP, TCP and UDP are
  111. relied on for this.  SLIP is popular on UNIX systems that support  TCP/IP,  so
  112. this  represented  the easiest way to get my package up and talking with other
  113. Internet sites.  It also allows the use of existing AX.25 TNCs without modify-
  114. ing  the  latter,  although  this  is should only be done as a stopgap measure
  115. until an HDLC link level driver can be integrated directly into the package.
  116.  
  117. 1.2.1.3.  AX.25/KISS TNC
  118.  
  119. Sends and receives IP and  ARP  datagrams  encapsulated  in  AX.25  Unnumbered
  120. Information (UI) frames. This allows an unlimited number of simultaneous users
  121. on the local radio channel, since there are no connections at link level.  The
  122. special AX.25 Level 3 Protocol ID values of hex CC (IP) and CD (ARP) are used.
  123.  
  124. With the 871225.0 release, support has also been added  for  encapsulating  IP
  125. datagrams  in  "normal"  AX.25 connected-mode packets.  This was a natural by-
  126. product of adding full AX.25 level 2 session support to the package.
  127.  
  128. This mode of operation requires that the TNC run special "KISS TNC" code. Ver-
  129. sions  for  the TNC-2, TNC-1, and VADCG/ASHBY boards are included in this dis-
  130. tribution.  Some manufacturers, including AEA and Kantronics, are adding  sup-
  131. port  for  KISS  into  their commercial TNC products.  Note that this style of
  132. operation is NOT compatible with a "stock" TNC carrying SLIP format  datagrams
  133. in connected mode.
  134.  
  135. 1.2.1.4.  AX.25/PACCOMM PC-100 Interface (NOT YET WORKING)
  136.  
  137. The PC-100 is an I/O adapter card for the PC containing a  Zilog  8530  Serial
  138. Communications  Controller and two AMD 7910 World Chip modems.  The encapsula-
  139. tion method is identical to (and compatible with) the AX.25/KISS TNC interface
  140. driver.
  141.  
  142. 1.2.1.5.  AX.25/Eagle Interface
  143.  
  144. There is a card available at some swapfests made  by  Eagle  Computer  Company
  145. that implements two ports using the Zilog 8530.  External modems are required.
  146. This driver is very similar to (and may eventually be merged with) the  PC-100
  147. driver.
  148.  
  149. 1.2.1.6.  Address Resolution Protocol (ARP)
  150.  
  151. ARP is used for the automatic mapping  of  IP  addresses  to  link  or  subnet
  152. addresses.  While  originally  designed for the specific task of mapping IP to
  153. Ethernet addresses, the protocol is general enough to be used on any  link  or
  154. subnet that supports a broadcast facility.  ARP is described in ARPA RFC-826.
  155.  
  156. Both Ethernet and AX.25 format addresses are currently supported.  Instead  of
  157. discarding  a packet when an ARP request is sent, this implementation holds it
  158. on a queue for a limited time, pending a response to the request.
  159.  
  160. 1.2.2.  Internet layer
  161.  
  162. 1.2.2.1.  Internet Protocol (IP)
  163.  
  164. IP is the universal network-level datagram protocol of the ARPA  Internet.  It
  165. corresponds  roughly to level 3 of the ISO Reference Model (ISORM). (Actually,
  166. IP belongs to the 3B internetwork sublayer if you follow the  amoeboid  proli-
  167. feration  of  ISO  sublayers).  Routines are provided to generate, receive and
  168. route (i.e., packet switch) IP datagrams. IP is specified in ARPA RFC-791  and
  169. MIL-STD-1777.
  170.  
  171. IP datagram fragmentation and reassembly is fully implemented. The IP  options
  172. Loose  Source  Routing,  Strict Source Routing and Record Route are supported;
  173. Stream ID, Security and Timestamp are ignored. (Few, if any,  IP  options  are
  174. used  extensively  in  the  ARPA  Internet).  The IP module includes a routing
  175. (packet switching) facility; currently this consists of a table  containing  a
  176. list  of  host-specific  destinations along with a "default" entry that may be
  177. used when the desired destination is not found in the table.  No  protocol  is
  178. yet provided to actually manage the table; currently it must be done manually,
  179. either locally or remotely.  NB! "Networks" (in the  ARPA  Class-A/B/C  sense)
  180. are  not  yet understood, in that all entries in the routing table (except for
  181. the default entry) must be host-specific.  This will be fixed  in  the  future
  182. with a "generalized subnetting" scheme that will allow each entry in the table
  183. to have an arbitrary, variable length "subnet mask."
  184.  
  185. 1.2.2.2.  Internet Control Message Protocol (ICMP)
  186.  
  187. ICMP is the error reporting adjunct to IP. It appears as a pseudo-protocol  on
  188. top  of  IP,  but  is  actually  considered  to be part of IP. The IP routines
  189. automatically generate ICMP messages whenever an error occurs in the  process-
  190. ing  of  IP datagrams; incoming ICMP messages are passed up to the originating
  191. end-to-end protocol for appropriate action. ICMP is specified in ARPA RFC-792.
  192.  
  193. This ICMP supports all options except ICMP Timestamps.
  194.  
  195. 1.2.3.  Host-Host Layer
  196.  
  197. 1.2.3.1.  Transmission Control Protocol (TCP)
  198.  
  199. TCP provides a reliable, sequenced "virtual circuit" or  "connection-oriented"
  200. service  atop IP on an end-to-end basis. It corresponds to the Transport layer
  201. (level 4) of the OSI model.  Since a single TCP module supports multiple  con-
  202. nections  through  the use of port numbers, it also provides Session (level 5)
  203. functionality without the need for a distinct layer. (Or it makes the  session
  204. layer  unnecessary, depending on your point of view). TCP is specified in ARPA
  205. RFC-793 and MIL-STD-1778.
  206.  
  207. The implementation supports an arbitrary number of  simultaneous  connections,
  208. limited  only  by  memory  space  for control blocks. An "upcall" mechanism is
  209. available to notify the user of three events: connection state change, receive
  210. data  available  and transmit buffer space available. The Maximum Segment Size
  211. option is understood and used when it is received, and a  global  variable  is
  212. used  for generating MSS in outgoing segments. There is currently no provision
  213. for sending URGent data.  The latest recommendations on  "tinygram"  avoidance
  214. (Nagle, ARPA RFC-896) are implemented and work quite well.
  215.  
  216. 1.2.3.2.  User Datagram Protocol (UDP)
  217.  
  218. UDP provides only a simple, unguaranteed "datagram" or  "connectionless"  ser-
  219. vice,  adding only checksums and port multiplexing to the raw service provided
  220. by IP. As an alternative to TCP, UDP also sits at  level  4  (and  5)  of  the
  221. ISORM. UDP is specified in ARPA RFC-768.
  222.  
  223. The implementation supports the creation of queues on local sockets. An upcall
  224. mechanism  similar  to  that used in TCP notifies the user when datagrams have
  225. arrived.
  226.  
  227. 1.2.4.  Application Layer
  228.  
  229. 1.2.4.1.  File Transfer Protocol (FTP)
  230.  
  231. FTP is for transfer of binary or text files between hosts. FTP  uses  two  TCP
  232. connections  -  one for exchanging commands and responses in the form of ASCII
  233. strings, and the other for the actual data transfers. FTP is defined  in  ARPA
  234. RFC-959.
  235.  
  236. FTP is implemented in two parts, a server half and a client half.  The  server
  237. half supports multiple simultaneous remote users, although at the moment there
  238. is no access control; anyone may access, delete or overwrite any file  on  the
  239. machine.  The client half is invoked by the "ftp" command.
  240.  
  241. 1.2.4.2.  Remote login protocol (Telnet)
  242.  
  243. Telnet is for logging into remote systems  and  negotiating  various  options,
  244. such  as remote vs local echoing. Telnet itself is documented in ARPA RFC-854,
  245. with the many options defined in other RFCs.
  246.  
  247. The client half supports the ECHO and TRANSMIT-BINARY options; it  is  invoked
  248. by  the "telnet" command. A telnet "server" has been written, but since MS-DOS
  249. isn't a timesharing system it is used for  keyboard-to-keyboard  conversations
  250. instead.  An incoming connect request to the local Telnet port creates a local
  251. Telnet session and notifies the local user. He may then select the new session
  252. and carry out a conversation with the remote initiator.
  253.  
  254. 1.2.4.3.  Simple Mail Transfer Protocol (SMTP)
  255.  
  256. As the name implies, is used for  the  transfer  of  electronic  mail  between
  257. hosts.  SMTP commands and responses are strings of ASCII characters resembling
  258. those used by FTP. SMTP uses a single TCP connection for both control and  the
  259. actual mail messages.  SMTP is described in ARPA RFC-821; headers in mail mes-
  260. sages are described in RFC-822.
  261.  
  262. A simple version server (receiver) is implemented;  it  accepts  mail  from  a
  263. remote sender and appends it to a mailbox. Mail forwarding, which accounts for
  264. much of the complexity in other mail  servers,  is  not  implemented.  A  mail
  265. client  ("user  agent")  for composing and sending messages developed by Bdale
  266. Garbee, N3EUA, and others is included.  It is called 'BM', and  is  documented
  267. elsewhere.
  268.  
  269. 1.2.5.  Session control
  270.  
  271. The user may manage several simultaneous Telnet and  FTP  client  invocations.
  272. Only  one client session is "active" at any one time, but the user may quickly
  273. switch between them. Terminal output arriving for an inactive session is  held
  274. until  that  session  is again made active.  (Note that this is in addition to
  275. the multiple server sessions which go on automatically  "in  the  background",
  276. i.e., without operator intervention).
  277.  
  278. The Internet package has been tested with and works  under  DoubleDos  4.0  by
  279. SoftLogic  Solutions,  allowing  the  system to be simultaneously "on the net"
  280. while executing conventional MS-DOS commands.  The net program uses  the  spe-
  281. cial  DoubleDos  function  call 0EEH to relinquish the processor when it isn't
  282. needed; this speeds up the task running in the other partition.  This function
  283. is a "no-op" when DoubleDos isn't active.
  284.  
  285. 2.  Administrivia
  286.  
  287. 2.1.  What an "IP Address" is and How to Get One
  288.  
  289. IP Addresses are 32 bit numbers that uniquely identify  a  given  machine  (or
  290. "host") running the TCP/IP protocol suite.  All of the possible 32 bit numbers
  291. are coordinated by an entity known as the Network Information Center, or  NIC.
  292. Amateur Radio operators are fortunate in that a "Class A Subnet" consisting of
  293. 24 bits of address, in the range 44.X.X.X, has  been  reserved  for  our  use.
  294. Brian  Kantor,  WB6CYT  of  San  Diego,  CA,  now  serves  as  the  top  level
  295. administrator of the 44.X.X.X address space, and assigns blocks  of  addresses
  296. to regional coordinators from around the world.
  297.  
  298. You need to have a unique address before you can link in with the rest of  the
  299. networked world.
  300.  
  301. <insert info on how to get address>
  302.  
  303. 2.2.  Obtaining Software Updates
  304.  
  305. The KA9Q Internet software package  is  still  evolving  and  growing.   As  a
  306. result,  we  occasionally  issue  updates to the software that fix bugs and/or
  307. update functionality.  Announcements are always made to the USENET news  group
  308. rec.ham-radio.packet,  and  in  the bulletins on N3EUA's telephone BBS system.
  309. They usually also show up on Compuserve within a day or two.  There  is  never
  310. any charge for the software.  A small charge may exist for copying floppies if
  311. you want the bits on disk, and of course you'll have to pay the long  distance
  312. if you grab the bits over the phone!
  313.  
  314. If several people are running the software in  your  area,  get  together  and
  315. decide on one person to get the new bits, then copy it around.  We won't mind.
  316.  
  317. 2.2.1.  From N3EUA's Phone BBS
  318.  
  319. The HIP Shack phone BBS, running Opus software, is reachable as  Fidonet  node
  320. 128/19,  303/495-2061.   The  BBS  supports  300,  1200  and  2400 baud, is up
  321. 24hrs/day, and is configured to allow first-time users  more  than  sufficient
  322. time to download the entire package in one phone call at 1200 baud.
  323.  
  324. The BBS is always the first place  that  the  software  is  available.   Beta-
  325. release executables for the PC can also occasionally be found here.  You down-
  326. load and use these at your own risk!  (Known as the "you get what you pay for"
  327. principle).
  328.  
  329. 2.2.2.  From N3EUA's Unix Machine
  330.  
  331. For those running Unix machines with UUCP capability, there  is  an  anonymous
  332. UUCP  login on winfree, N3EUA's BSD Unix machine, that can be used to download
  333. the software.  This machine is up 24hrs/day, but only has one modem,  and  the
  334. modem stays fairly busy.  A typical L.sys entry might be:
  335.  
  336.         winfree Any ACU 2400 1-303-495-0492 ogin: Uanon word: notFTP
  337.  
  338.  
  339. Start by transferring the file /usr/spool/uucppublic/pub/README for a list  of
  340. the files available, and current release notes.
  341.  
  342. 2.2.3.  Via FTP on the Internet
  343.  
  344. The current revision of the software is available on  SIMTEL20.ARPA  within  a
  345. few  days  of  each  release.   The  files  usually  reside  in  the directory
  346. PD:<MSDOS.PACKET>.  Questions on the files on  Simtel20  can  be  directed  to
  347. W8SDZ@SIMTEL20.ARPA.  Anonymous FTP's are allowed.
  348. Beta-releases are often available on the machine LOUIE.UDEL.EDU, in the direc-
  349. tory  tree rooted at pub/ka9q.  Anonymous FTP's are allowed, but unless you're
  350. working on the software, the bits on louie can be "dangerous", as  they  often
  351. include  incompletely implemented features, and can have serious bugs.  Caveat
  352. Emptor.
  353.  
  354. 2.2.4.  On PC Floppies
  355.  
  356. The Tucson Amateur Packet Radio association (TAPR) now provides floppy  copies
  357. of  the  software  on  360k PC floppies, and can provide KISS ROMs for various
  358. TNC's, at a nominal charge for duplication and  shipping.   Contact  TAPR  for
  359. more information.
  360.  
  361. 2.2.5.  On Native Media for Other Machines
  362.  
  363. Copies of the software for the Macintosh and Amiga are best obtained by  down-
  364. loading  from  an  online  source, or by copying a friend's disk.  If all else
  365. fails, Mikel Matthews (the author of the Mac/Amiga port) is willing to make  a
  366. small number of copies on native media for the Mac and/or Amiga.  Mikel can be
  367. reached via UUCP mail at ...uiucdcs!addamax!mikel.
  368.  
  369. 3.  Installation of the Software
  370.  
  371. Installing the KA9Q Internet Package on your computer is not very hard, but if
  372. you  haven't  tried  to do it before, it can be a bit confusing.  The greatest
  373. efforts made so far towards making the process simple and understandable  have
  374. been  made  by  Brian  Lloyd,  WB6RQN.  Much of this installation section is a
  375. direct copy of portions of his HOWTO.DOC document.  Information about  instal-
  376. lation  on  machines  other  than  the  IBM clone family has come from various
  377. sources.
  378.  
  379. 3.1.  Configuring Your TNC for Network Operation:
  380.  
  381. If you are using this software in a University or other wired-network environ-
  382. ment, you may want to skip past the TNC installation section.  All Hams should
  383. keep reading!
  384.  
  385. There are now several choices for TNCs to be  used  with  the  TCP/IP  network
  386. code.  Versions of the Keep It Simple Stupid TNC interface software (KISS) are
  387. available for the TNC-1, the TNC-2, the VADCG board and  clones  (Ashby),  the
  388. Kantronics  family  of  TNCs,  and  the  AEA TNCs. Following are the different
  389. setup/configuration modes for the different TNCs.
  390.  
  391. 3.1.1.  TNC-1 or Heath HD-4040
  392.  
  393. The firmware for the TNC-1 is available in either a downloadable version or  a
  394. stand  alone  version.   I  will  describe  only the stand alone version here.
  395. Locate the ROM labeled E000 and remove it.  Insert the KISS PROM in its  place
  396. making  sure  that you orient the prom in the same direction (failure to do so
  397. will result in smoked PROM).  Connect your TNC-1 to  your  computer  using  an
  398. RS-232 cable.  A cable that passes the signals from pins 2, 3, and 7 is suffi-
  399. cient.
  400.  
  401. Since the TNC-1 has no switches for setting the baud rate to the computer  the
  402. firmware has been "hard wired" to 4800 baud.  See the documentation that comes
  403. with the TNC-1 version of KISS for instructions on how to patch the .HEX  file
  404. for other baud rates.
  405.  
  406. 3.1.2.  TNC-2 and Clones
  407.  
  408. First step is to prepare  your  TNC-2  for  use  with  TCP/IP.   The  standard
  409. firmware for the TNC-2 is not very computer friendly and, as such, is not very
  410. useful when it comes time to make your computer speak  with  other  computers.
  411. To  that  end Mike Chepponis, K3MC, wrote the KISS (Keep It Simple Stupid) TNC
  412. code.  There are two ROM versions for the TNC-2. The first is contained  in  a
  413. type  2764  or  27C64  EPROM.  This version contains the KISS code in it.  The
  414. second version is contained in a type 27256 or 27C256 EPROM and contains  both
  415. the standard TAPR 1.1.3 TNC code and a loader that will permit you to download
  416. the KISS code into the TNC.  Check the EPROM you have received  and  determine
  417. which  type  you have.  If you are burning your own EPROMs you probably do not
  418. need these instructions.
  419.  
  420. Open up your TNC and locate the ROM.  It is in the socket labeled "U23." Using
  421. a  small  nail file or screwdriver gently pry up the existing EPROM. Carefully
  422. press the new EPROM into place being sure that the orientation  is  the  same.
  423. If  you  are  installing  the 2764 type of EPROM you will need to make a small
  424. modification to the TNC.  There is a location on  the  board  just  above  the
  425. first RAM socket labeled JMP-6.  Turn the board over and cut the trace joining
  426. the two pads.  Solder a two-pin jumper header in place.   When  using  a  type
  427. 2764  the  jumper  at  JMP-6 should be removed and installed when a type 27256
  428. EPROM is being used.  That should complete the hardware part of the  installa-
  429. tion.  As an alternative you may choose to burn the KISS code into a 27256 and
  430. not bother with jumpers.
  431.  
  432. Attach your TNC to your PC using an RS-232C cable.  You can use the same cable
  433. that you were using to connect your PC to your TNC.  If you are doing this for
  434. the first time and are not sure about your cabling, a cable with just pins  2,
  435. 3, and 7 passed through is sufficient.  Some PCs like to see the signals Clear
  436. To Send (CTS, pin 5), Data Set Ready (DSR, pin 6),  and  Data  Carrier  Detect
  437. (DCD,  pin  8) asserted.  You can set this up by jumpering pin 4 to 5, and pin
  438. 20 to pins 6 and 8 at the female DB-25 connector that goes to the PC.
  439.  
  440. Now to verify that the TNC still works.  Apply power to the TNC  and  turn  it
  441. on.   The  STA,  CON,  and  PWR LEDs should come on and the STA and CON lights
  442. should go out again about 1 second later.  If you have  the  type  2764  EPROM
  443. with  the  KISS  code  in it one or both of the STA and CON LEDs will begin to
  444. flash.  If the CON LED flashes you have 8Kb of RAM in the TNC.  If the STA LED
  445. flashes  you have 16Kb of RAM.  If both LEDs flash you have 32 Kb of RAM.  The
  446. flashing of the LEDs verifies the proper operation of the TNC.
  447.  
  448. If you got the combined loader and TAPR version EPROM, checkout is a  slightly
  449. different  process.   You  can  test  your TNC-2 using two methods.  The first
  450. method is to connect your TNC to a terminal program and send the character 'h'
  451. or  'H'  to  the  TNC.  The result should be the standard TNC startup message.
  452. Exit from the 1.1.3 mode of operation by issuing the reset command to the TNC.
  453. The second method involves downloading the KISS code to the TNC.  Use the mode
  454. command to set the baud rate of the comm port to the  proper  value,  e.g.  it
  455. matches  the  DIP  switch  setting  on  the back of the TNC, and copy the file
  456. tnc2kiss.hex to the appropriate comm port.   The  following  command  sequence
  457. will serve to download the KISS code to the TNC:
  458.  
  459.         mode com1:4800
  460.         copy tnc2kiss.hex com1:
  461.  
  462. If the download was successful (it takes about one minute) the STA and/or  CON
  463. LEDs will begin flashing as described in the previous paragraph.  If the down-
  464. load is not successful check the cable from computer to TNC,  check  the  baud
  465. rate  on the TNC, and check to ensure that the computer is indeed sending data
  466. to the TNC.  Once this is done the TNC is ready to use with the NET program.
  467.  
  468.      NOTE: running KISS causes the stored parameters  in  the  TNC,  i.e.
  469.      MYCALL,  NEWMODE,  TXDELAY,  etc.,  to be destroyed.  Every time you
  470.      shift from KISS to TAPR modes you MUST reset the parameters.
  471.  
  472.  
  473. 3.1.3.  AEA PK-232, PK-87, or new Heath TNC (PK-232 clone)
  474.  
  475. If you have one of these boxes, congratulations!  You do not  have  to  change
  476. PROMS!   KISS  is already installed as a standard feature if you have a recent
  477. release of the firmware, 4-MAR-87 or later for the  PK-232,  or  21-JAN-87  or
  478. later for the PK-87, you have KISS in your TNC already.  To make it work first
  479. ensure that your computer can communicate with  the  TNC  in  standard  packet
  480. mode.   This  will  ensure  that the computer, TNC, cabling, and radio are all
  481. operating properly.
  482.  
  483. [Please note that one of the commands "PACKET" is not valid on the  PK-87  and
  484. will only elicit a "Huh?" response.  Please note that comments have been added
  485. to the commands.  Do not type the information following  the  double  dash  or
  486. type the double dash itself.]
  487.  
  488. Here is the sequence of commands that will turn on the KISS mode for  the  AEA
  489. products:
  490.  
  491.         AWLEN 8         -- ensure it can speak 8 bit data
  492.         PARITY 0        -- no parity
  493.         RESTART         -- warm reset; make the previous commands take effect
  494.         PACKET          -- PK-232 or Heath only
  495.         TONE 3          -- PK-87 only
  496.         START 0         -- start, stop, xon, xoff, xflow to disable software
  497.         STOP 0             flow cont
  498.         XON 0
  499.         XOFF 0
  500.         XFLOW off
  501.         CONMODE trans   -- pass through all characters
  502.         HPOLL off       -- disable host polling
  503.         KISS on         -- enable KISS version of host mode
  504.         RAWHDLC on      -- turn off AX25L2 (the protocol is now handled by the PC)
  505.         PPERSIST on     -- turn off DWAIT and enable p-persistence
  506.         HOST on         -- start KISS running
  507.  
  508.  
  509. The PK-87 or the PK-232 will remain in the KISS mode until you  send  a  break
  510. (~200ms of spacing) or until you send the command character three times (^C ^C
  511. ^C) in quick succession.  Beware!  Some terminal emulators  (like  YAPP)  will
  512. send  a  break  signal  when you exit from them.  That will undo your work and
  513. cause all manner of confusion.  The terminal program  PROCOMM  seems  to  work
  514. just  fine.  The TNC may also be switched back to ordinary AX.25 mode by issu-
  515. ing the following command from within NET.EXE:
  516.  
  517.         param ax0 255
  518.  
  519.  
  520. 3.1.4.  Kantronics
  521.  
  522. Kantronics has recently begun to offer KISS on their products.  It is the sim-
  523. plest of the commercial implementations of KISS to configure and use.
  524.  
  525. First setup and operate your KAM, KPC-II, or KPC-4 for standard packet  opera-
  526. tion.  This will ensure that the computer, TNC, cabling, and radio are operat-
  527. ing properly.  Use your terminal program to send the following commands:
  528.  
  529.         ABAUD 4800      -- set the baud rate to whatever you will be using when
  530.                            net is running (set by the attach command)
  531.         DWAIT 0         -- disable DWAIT
  532.         PERSIST 50      -- enable persistence and set it to about 20%
  533.         SLOTTIME 16     -- set the slot time to 160 ms
  534.         KISS ON         -- Enable KISS mode at the next reset
  535.         PERM            -- make the above command permanent so that KISS
  536.                            will be entered whenever the TNC is powered up
  537.         RESET           -- start KISS
  538.  
  539.  
  540. If you wish to have the the TNC revert back to ordinary AX.25 mode  of  opera-
  541. tion  you  should  omit the PERM command from the above sequence. That way the
  542. TNC will revert back to ordinary AX.25 mode when  the  power  is  removed  and
  543. restored  to  the TNC.  The TNC may be switched back to ordinary AX.25 mode by
  544. issuing the command:
  545.  
  546.         param ax0 255
  547.  
  548.  
  549. This command will work even if the PERM command has been used to make KISS the
  550. default mode of operation.
  551.  
  552. 3.2.  Installation of NET.EXE on an IBM PC or Clone
  553.  
  554. Create a directory called EXE and set that  as  the  default  directory.   Use
  555. PKXARC  to  extract the files from EXE.ARC into the new directory.  Should you
  556. not have PKXARC already, run the program PKX35A35.EXE provided with  the  dis-
  557. tribution.  This program will create the extraction utility and its documenta-
  558. tion.
  559.  
  560. There are two programs that make up the network software:  NET.EXE  (the  net-
  561. working code) and BM.EXE (the mail program).  Copy these programs from the EXE
  562. directory to the place on your hard disk where you keep command programs.   If
  563. you  are  running on a floppy based system you should create a bootable floppy
  564. and copy these programs to the floppy.
  565.  
  566. Test to make sure that everything is there by executing  the  programs.   Type
  567. the command "net" and, if the installation of the network code was successful,
  568. the message "KA9Q internet protocol package" and the prompt "net>" will appear
  569. on  the screen.  This means that the network code is running and awaiting com-
  570. mands.
  571.  
  572. Exit from the net code with the command "exit." Now run the command "bm."  The
  573. screen  should  display  the message "Bdale's Messy-DOS Mailer" and the prompt
  574. "Brian"> will appear (this prompt or something like it is a  function  of  the
  575. content  of  the  bm.rc configuration file).  If all this has occurred, all is
  576. well so far.  If you do not get this response from bm, do  not  be  concerned.
  577. Try again after you have configured bm in the following steps.
  578.  
  579. 3.2.1.  Installing the Mail Directories used by BM
  580.  
  581. First step is to configure the mailer (BM).  To make BM work properly you must
  582. create the following directories on your disk:
  583.  
  584.         //spool
  585.         //spool//mail
  586.         //spool//mqueue
  587.  
  588.  
  589. Copy the file SEQUENCE.SEQ to the /spool/mqueue  directory.   Copy  the  files
  590. HOSTS.NET  and  BM.RC to the root directory of the default drive used when net
  591. is running.  If you are on a floppy based system you need to  put  BM.RC  with
  592. NET.EXE,  BM.EXE,  AUTOEXEC.NET,  HOSTS.NET,  and AUTOEXEC.BAT in the root (/)
  593. directory (more on AUTOEXEC.NET later).
  594.  
  595. 3.2.2.  HOSTS.NET
  596.  
  597. You will need to edit the file HOSTS.NET to know about all  the  systems  with
  598. which  you  will  exchange mail.  This is how net will translate the name into
  599. the IP address.  Here is an example of some  of  the  entries  I  have  in  my
  600. machine for other local TCP/IP stations:
  601.  
  602.         44.96.0.2       wb2sef.ampr
  603.         44.96.0.16      n8fjb.ampr
  604.         44.96.0.17      ka3lyq.ampr Roel
  605.  
  606.  
  607. All this does is translate the symbolic name to the IP  address,  e.g.  WB2SEF
  608. gets  translated  to  44.96.0.2  so that IP can route it to the proper network
  609. node.  This saves you from having to remember lots of numbers.  You  may  note
  610. that  the  last  entry has two aliases, either of which may be used to specify
  611. the IP address 44.96.0.17.  There is essentially no limit  to  the  number  of
  612. aliases  that  may  be listed for a single IP address.  Just be sure that they
  613. are all on one line.
  614.  
  615. 3.2.3.  BM.RC
  616.  
  617. Next edit the file BM.RC.  This file lets the mail  system  know  about  local
  618. host name, user name, and editor name.  Here are some example entries:
  619.  
  620.         host wb6rqn.ampr
  621.         user brian
  622.         edit emacs
  623.  
  624.  
  625. The edit entry should contain the name of your favorite editor, such as  edlin
  626. (edlin is not your favorite editor?).  This editor will be used to construct a
  627. mail message when you invoke that function of bm.  You may use any DOS  compa-
  628. tible  editor just so long as it has the capability to prepare ascii files (be
  629. careful if you specify a word processor -- some word processors embed  special
  630. characters in the file).
  631.  
  632. Later on you can read the documents BM.DOC and SMTP.DOC to get  more  informa-
  633. tion.  You at least have enough info to get your mailer running now.
  634.  
  635. 3.2.4.  FTPUSERS
  636.  
  637. Now you need to possibly modify the /FTPUSERS file to permit users to send and
  638. receive  files  from  your system.  The FTPUSERS file contains the information
  639. about users in the following format:
  640.  
  641.         user password /directory permission-code
  642.  
  643.  
  644. The 'user' entry is the user's name, 'password' is the password for that user,
  645. '/directory'  is  the directory to which the user will have access (all of the
  646. subdirectories too), and permission-code is a number  between  0  and  7  that
  647. defines what the user may do.
  648.  
  649. The permission-code is a bit-map where the three least significant  bits  each
  650. have a specific meaning.  Here is a table:
  651.  
  652.         1 - read and directory access
  653.         2 - create access
  654.         4 - overwrite and delete access
  655.  
  656.  
  657. The protection bits are added together to  create  the  permission-code.   For
  658. example  3  (1+2)  permit  the user to read files and create new files but not
  659. overwrite or delete and existing file.  A permission-code of 7  (1+2+4)  would
  660. permit full access.  Here are some examples:
  661.  
  662.         guest * /public 3
  663.         brian xyzzy / 7
  664.  
  665.  
  666. In these examples guest may log in with any password and  may  copy  files  or
  667. create  new  files  in the directory /public while user brian must log in with
  668. password xyzzy but will be granted full access, e.g. read,  write,  overwrite,
  669. and delete, to all files in the system.
  670.  
  671. If you are running in a radio-based environment  I  would  not  give  out  the
  672. latter  user/password  combination  because it will give anyone access to your
  673. entire disk.  Also remember that the user/password combination  are  broadcast
  674. in-the-clear  for anyone to read (if they have trace turned on). It is wise to
  675. segregate your radio-link users in a separate directory tree  and  not  permit
  676. delete or overwrite access.  That should prevent malicious mischief.
  677.  
  678. 3.2.5.  Configuring NET and the AUTOEXEC.NET file:
  679.  
  680. Now you need to configure and run NET.  Configuring NET to  run  may  be  per-
  681. formed manually every time you start up NET.EXE but that gets old pretty fast.
  682. There are usually many commands that must be typed the same way every time net
  683. is  started.   Fortunately  Phil thought of this and provided the AUTOEXEC.NET
  684. file.  The intention here is to place all the commands that you always execute
  685. in  a  file to be read and executed by NET.EXE whenever you start up.  To this
  686. end you will want to edit the file  AUTOEXEC.NET  prior  to  running  NET.EXE.
  687. Just use a text editor to enter the commands into the file AUTOEXEC.NET as you
  688. would type them at the "net>" prompt.
  689.  
  690. 3.2.5.1.  Setting the IP address:
  691.  
  692. When NET.EXE first starts up you need to tell it about many things,  i.e  what
  693. comm  ports  you  have,  what your IP address is, what your host name is, what
  694. other systems you will communicate with, what services you  wish  to  provide,
  695. etc.   The  first  thing  to do is to tell net who we are with the ip address,
  696. hostname, and ax25 mycall commands.  Enter your ip address in  dotted  decimal
  697. notation or give the symbolic name from your HOSTS.NET file.  Here is an exam-
  698. ple:
  699.  
  700.         ip address [44.96.0.1]
  701.  
  702.  
  703. The selection of an address is very important.  If you are going to be part of
  704. a network you must have a unique address.  Talk to the person in your area who
  705. is responsible for coordinating addresses.  If you  are  not  a  part  of  the
  706. Internet  and  are  just  using  this with your own computers, pick any unique
  707. address that suits you.
  708.  
  709.      NOTE:  Throughout this document names and IP  addresses  are  inter-
  710.      changeable.   Net differentiates between the two by requiring you to
  711.      enclose IP addresses in square brackets [].
  712.  
  713.  
  714. 3.2.5.2.  Hostname:
  715.  
  716. The hostname command is used  to  set  the  name  of  your  system.   This  is
  717. displayed  when someone initiates an FTP session with your system.  Again here
  718. is an example:
  719.  
  720.         hostname wb6rqn.ampr
  721.  
  722.  
  723. This corresponds to my system in my local domain.  For the purposes of amateur
  724. packet  radio your call sign followed by "ampr" (amateur packet radio network)
  725. is probably sufficient.
  726.  
  727. 3.2.5.3.  AX25 Mycall (packet radio only):
  728.  
  729. Since I also run net on the air  (amateur  packet  radio  networking)  I  must
  730. specify my amateur call sign with the ax25 mycall command.  Again, here is the
  731. entry from my AUTOEXEC.NET file:
  732.  
  733.         ax25 mycall WB6RQN-0
  734.  
  735.  
  736. The call sign is entered in the same form that is used with the standard  TAPR
  737. TNC software, e.g. the call sign is followed by the SSID field.
  738.  
  739. If you are going to run TCP/IP on the air using  the  ax25  driver  (described
  740. below  with  the  attach command) the ax25 mycall entry MUST precede the first
  741. attach command that uses the ax25 driver.   Otherwise  there  is  no  required
  742. order for these commands.
  743.  
  744. 3.2.5.4.  Attach command
  745.  
  746. The attach command tells net about your comm ports and in what mode the  ports
  747. will  operate.   Currently four types of comm hardware are supported: standard
  748. PC async comm adapters, the HAPN TNC board for  the  PC,  the  Eagle  RS-232/2
  749. card,  and  the  3Com  Ethernet controller.  Each of these devices has its own
  750. version of the attach command.  Here  is  the  attach  command  for  an  async
  751. adapter  card  acting as COM1:.  You would use this to attach your pc to a TNC
  752. running the KISS code:
  753.  
  754.         attach asy 0x3f8 4 ax25 ax0 1024 256 4800
  755.  
  756.  
  757. This means attach an asynchronous adapter whose port address is 3F8 hex  using
  758. interrupt  line  4  (both  standard  for com1:), as an ax25 device (KISS TNC),
  759. using a buffer size of 1024 and  a  maximum  transmission  unit  (the  largest
  760. packet you are allowed to send) of 256 bytes, running at 4800 baud.  The media
  761. name for this device will be ax0, a name that will be used in the route,  con-
  762. nect,  and  param  commands  to  refer  to this comm port.  This is probably a
  763. pretty good place to start.  If you also wish to use COM2  instead  of  or  in
  764. addition to COM1 you would add the line:
  765.  
  766.         attach asy 0x2f8 3 ax25 ax1 1024 256 4800
  767.  
  768.  
  769. If you are instead going to use COM2 to connect with another PC using  a  hard
  770. wired  connection  (some  of  us  do have multiple PC's) you might want to use
  771. COM2: to connect to the other PC.  We would want to use SLIP to do this so the
  772. attach command would be:
  773.  
  774.         attach asy 0x2f8 3 slip sl0 1024 576 4800
  775.  
  776.  
  777.      NOTE:  IBM-PCs and clones all use I/O port address 0x3f8 and  inter-
  778.      rupt  request  line  4 for COM1 and port address 0x2f8 and interrupt
  779.      request line 3 for COM2.  There are other comm cards that  implement
  780.      COM3,  COM4,  etc.,  but  these  cards  may  use  non-standard  port
  781.      addresses and interrupt request lines for these  ports.   Check  the
  782.      documentation that came with your comm card if you are trying to use
  783.      COM3 or higher.
  784.  
  785. If you have an HAPN TNC card for your PC you will want to enter the  following
  786. attach command:
  787.  
  788.         attach hapn 0x3f8 4 ax25 h0 1024 256 csma
  789.  
  790.  
  791. This tells net to use an HAPN board with the port address 3F8h  and  interrupt
  792. request  line  4.   The  speed  of the board is determined by the board so the
  793. software has no control over that function.  The  last  parameter,  listed  as
  794. operation.
  795.  
  796. Recently the Eagle RS-232/2 card  has  become  available  at  very  reasonable
  797. prices.   This two-channel card generates HDLC frames directly and may be con-
  798. nected to a modem for direct packet radio operation without a TNC. Normally it
  799. would be connected to a Bell-202-type half-duplex asynchronous modem.
  800.  
  801. The attach command for the Eagle board is almost  identical  to  that  of  the
  802. standard async comm card.  Here is an example:
  803.  
  804.         attach eagle 0x300 5 ax25 eg0 2048 256 1200
  805.  
  806.  
  807. Two items must be as shown in the example: the mode must always be  ax25  (not
  808. SLIP)  and  the  media  name must begin with 'eg' and end with a single digit.
  809. The first Eagle card must be called eg0 and the second must be called eg1.
  810.  
  811. The Eagle card is hard wired for a base address of 0x300 and IRQ5.  The use of
  812. IRQ5  conflicts  with  the  disk  controller on the PC/XT (no problem with the
  813. PC/AT).  If you wish to use the Eagle card with a PC/XT or compatible you will
  814. need  to locate the trace from pin 3 of the 74LS125 (U12) to B23 (IRQ5) on the
  815. edge connector.  Cut this trace at the edge connector and  reroute  it  to  B4
  816. (IRQ2)  on the edge connector.  This will eliminate the conflict and allow you
  817. to use IRQ2.
  818.  
  819. If you happen to have more than one PC you may wish to connect them  using  an
  820. Ethernet.   The  net  software supports the 3Com 3C500 or 3C501 boards for the
  821. PC.  The command to attach this board is:
  822.  
  823.         attach 3c500 0x300 3 arpa ec0 5 1500
  824.  
  825.  
  826. This tells net that there is a 3Com 3C500 board  at  I/O  address  300h  using
  827. interrupt  request  line  3  with the media name ec0.  Net should reserve five
  828. buffers and the largest Ethernet packet may be 1500 bytes long.
  829.  
  830. A word about the selection of the value for  the  maximum  transmission  unit.
  831. For standard TNCs and radios 256 is probably the largest value you should use.
  832. This ensures compatibility with the rest of the AX.25  community  and  ensures
  833. that you are legal if you are operating unattended (part 97 of the FCC regula-
  834. tions specifically  mentions  the  AX.25  protocol  in  permitting  unattended
  835. digital  operation above 50 MHz).  The smallest value you may use is 64.  Per-
  836. formance improves with larger values IF you can get  them  to  the  other  end
  837. without  errors.   I suggest you stick with 256 until you can run some experi-
  838. ments of your own.  If you have a good transmission path and all the  stations
  839. and  gateways are attended, feel free to use larger values.  It will result in
  840. improved performance (see the discussion of the mss and window parameters).
  841.  
  842. 3.2.5.5.  Param command:
  843.  
  844. If you are using a TNC running the KISS code (you  probably  are  if  you  are
  845. operating  amateur  packet  radio)  you will need to set the parameters in the
  846. TNC.  This is accomplished with the param command.
  847.  
  848. There are five settable parameters in the kiss code.  They are:
  849.  
  850. 1.   Transmitter keyup delay (TXD).  This is how long the TNC will wait  after
  851.      keying the transmitter prior to beginning to send data.  The proper value
  852.      for this parameter is dependent on your configuration.  This value is  in
  853.      10's  of  milliseconds.   Acceptable  values  range  from 0 (0 ms) to 255
  854.      (2,550 ms or 2.55 seconds).
  855.  
  856. 2.   Persistence (p).  This is the probability that  the  TNC  will  key  your
  857.      transmitter  if  a slot is found empty (the channel is free).  Acceptable
  858.      values range from 0 (p = (0+1)/256 = 0.4%) to 255 (p = 255+1/256 = 100%).
  859.      The  default  value is 63 (25%).  The optimum value is somewhere close to
  860.      1/n where n is the number of users on the channel.
  861.  
  862. 3.   Slot time (ts).  This is how long that the TNC will wait between  samples
  863.      of  the  channel.  Acceptable values range from 0 (0 ms) to 255 (2,550 ms
  864.      or 2.55 seconds).
  865.  
  866. 4.   Tail timer (tt).  This is how long the  TNC  will  keep  the  transmitter
  867.      keyed  after  the  last  character  has been transferred to the HDLC con-
  868.      troller.  This has become an outdated command since most of the TNCs  now
  869.      set this value automatically based on data rate.
  870.  
  871. 5.   Full Duplex.  A zero value (the default value) means operate the  TNC  in
  872.      half-duplex  CSMA  mode  (listen  before you transmit).  A non-zero value
  873.      means transmit whenever there is data to send.
  874.  
  875. Let us assume that on the channel associated with ax0 that I have a radio that
  876. requires  a  transmit  keyup  delay  of  200  ms, I want persistence to be 20%
  877. (p=0.2), and I want the slot time to be 160 ms.  These are the values that  we
  878. use  in the DC area and make us "good neighbors" who do not "hog" the channel.
  879. I would enter the following commands:
  880.  
  881.         param ax0 1 20
  882.         param ax0 2 51
  883.         param ax0 3 16
  884.  
  885.  
  886. Note that the parameters are now specified as decimal values.
  887.  
  888.      NOTE: The 'param' command will be used  for  issuing  other  device-
  889.      dependent  commands  as  the need arises.  Right now it is used only
  890.      for setting the parameters for kiss TNCs and the speed of  SLIP  and
  891.      AX25  links.  Other versions of the 'param' command will be added as
  892.      the need arises.
  893.  
  894. If you are dealing with a SLIP link (you used the entry slip instead  of  ax25
  895. in  the  attach  command)  the param command is used to change the speed (baud
  896. rate) for the line.  If you wanted to change the speed  of  your  second  slip
  897. link to 4800 baud you would enter:
  898.  
  899.         param sl1 4800
  900.  
  901.  
  902. 3.2.5.6.  ax25 digipeat command (packet radio only):
  903.  
  904. If you are currently an active digipeater in your area you can also make  your
  905. system  continue  to  be  a  digipeater for those poor souls unlucky enough to
  906. still be running ordinary AX.25.  The command for this is:
  907.  
  908.         ax25 digipeat on
  909.  
  910.  
  911. 3.2.5.7.  Mail Gateway:
  912.  
  913. The mail subsystem (SMTP) needs to know where to send mail should the destina-
  914. tion be unknown to the sending system.  This is handled by the gateway command
  915. as follows:
  916.  
  917.         smtp gateway wa3pxx
  918.         - or -
  919.         smtp gateway [44.96.0.13]
  920.  
  921.  
  922. Should you try to send mail to a host that is not in your HOSTS.NET  file  the
  923. mailer will route the mail to the system specified in the gateway entry.  This
  924. presumes that the gateway system is smart enough to figure  out  to  whom  the
  925. mail  is addressed so that the mail can be forwarded.  At this time the mailer
  926. in NET.EXE is not "smart" enough to act as a mail forwarding node.  This field
  927. is only here should you be lucky enough to have another computer accessible to
  928. you with a smart SMTP mailer or another host that acts as a gateway to another
  929. network.   Any UNIX 4.2 or 4.3 BSD system has such a mailer.  A PC running the
  930. WA3PXX BBS gateway also will serve.
  931.  
  932. For packet radio enthusiasts another use for the gateway command  is  to  send
  933. mail  on  to  your  local  BBS  gateway station.  Bob Gibson, WA3PXX, has con-
  934. structed a gateway program that will permit the  transfer  of  mail  from  the
  935. WA7MBL  BBS  to  SMTP  and back again.  By having your local BBS run DoubleDos
  936. with the WA7MBL BBS in one partition and NET in the other  you  can  automati-
  937. cally move mail between the two domains.
  938.  
  939. 3.2.5.8.  Construction of Routing Tables:
  940.  
  941. Now you need to construct the routing table.  This table is used by the IP  to
  942. determine  how  to  forward your packets.  Each entry consists of two or three
  943. parts, the IP address of the destination, the link upon which it is to be for-
  944. warded,  and  the  IP address of the next station in line if there can be more
  945. than one IP address on the link (used if the mode is ax25 and not used if  the
  946. mode is slip).  Here are three sample entries, one for a station more than one
  947. hop away via ax25 to be forwarded by 44.96.0.7, one for station one  hop  away
  948. on ax25, and one for a station on the other side of a slip link:
  949.  
  950.         route add [44.96.0.5] ax0 [44.96.0.7]
  951.         route add [44.96.0.2] ax0
  952.         route add [44.96.0.12] sl0
  953.         route add n3ja ax0
  954.  
  955.  
  956. The first string following the command  'route  add'  is  the  destination  IP
  957. address.   The  second  field, i.e. ax0 or sl0, is the media and must match up
  958. with one of your previous attach commands.  The last field is the next station
  959. in the path if the destination is more than one hop away.  This is an optional
  960. field and only needs to be used if the media is a broadcast media such as Eth-
  961. ernet or AX.25 and the destination is more than one hop away.
  962.  
  963. Note that the address may be specified as  either  an  IP  address  in  dotted
  964. decimal notation or it may be a symbolic address from your hosts.net file.  If
  965. you choose the latter technique you must enter the symbolic address  precisely
  966. as it was entered in the hosts.net file, e.g.  upper and lower case characters
  967. in the name are significant.
  968.  
  969. If you are using an Eagle RS-232/2 board your  media  is  named  eg0  or  eg1.
  970. There  is  still a problem because there are two ports on the board.  In order
  971. to solve this problem you will need to add the letters 'a' or 'b' to the media
  972. name.   For  instance, if you have a single Eagle card your media names become
  973. 'eg0a' and 'eg0b' for the A and B ports of the card  respectively.   Remember,
  974. take  the  media  name from the attach command and append either A or B to the
  975. end of the name to select the appropriate port.  Here are some examples:
  976.  
  977.         route add [44.96.0.22] eg0a
  978.         route add aj9x eg0b wb3ffv
  979.  
  980.  
  981. There are two other special types of route entries; the default  entry  and  a
  982. cluster entry.  Here is a default entry:
  983.  
  984.         route add default ax0 [44.96.0.99]
  985.  
  986.  
  987. This means that if the address does not match any entry in your  table,  route
  988. the  packet to 44.96.0.99 via ax0.  Hopefully the switch at 44.96.0.99 will be
  989. able to forward the packet to its destination.  This generally works  well  if
  990. you  are  merely an end node (a leaf) in the network and all your traffic goes
  991. to a single gateway.
  992.  
  993. 3.2.5.8.1.  Cluster Routing and its Associated Concepts:
  994.  
  995. The other option for routing is cluster routing.  It allows you to send blocks
  996. of  addresses  in  a  certain direction.  This is useful if all the users in a
  997. given area have some common part to their IP addresses.  Here is  an  explana-
  998. tion of cluster routing and addresses in general.
  999.  
  1000. The IP address is thirty-two (32) bits long.  It is generally  represented  as
  1001. four 8-bit numbers, with each number being written in decimal form.  For exam-
  1002. ple, my IP address is 44.96.0.1.  This number can be represented as the  hexa-
  1003. decimal  value 2C600001 or 00101100011000000000000000000001 in binary.  We can
  1004. break this out as follows:
  1005.  
  1006.         decimal           44        96         0         1
  1007.         hexadecimal       2C        60        00        01
  1008.         binary         00101100  01100000  00000000  00000001
  1009.  
  1010.  
  1011. Normally when you make an entry in the routing table, all bits of the  address
  1012. are  significant,  e.g.  an exact match is needed for the address to be recog-
  1013. nized.  On the other end there is the  default  route  in  which  any  address
  1014. matches.
  1015.  
  1016. Cluster routing falls somewhere between these two extremes.   Cluster  routing
  1017. allows  you  to specify how much of the address is to be considered valid.  In
  1018. order to determine how many bits in  the  address  are  valid  you  enter  the
  1019. address in a special format:
  1020.  
  1021.         route add [44.96.0.64]/26 ax0
  1022.  
  1023.  
  1024. This means that only the first 26 bits of the address  are  to  be  considered
  1025. significant.   This  is  a  form  of  wild card for the address.  Here is that
  1026. address in binary to show the mapping:
  1027.  
  1028.         00101100  01100000  00000000  01??????
  1029.  
  1030.  
  1031. The question marks in the above address show the least  significant  six  bits
  1032. being  "wild,"  or  matching  any corresponding bits in the address.  Here are
  1033. some examples:
  1034.  
  1035.         44.96.0.67     00101100  01100000  00000000  01000111  (a match)
  1036.         44.96.0.89     00101100  01100000  00000000  01011001  (a match)
  1037.         44.96.0.01     00101100  01100000  00000000  00000001  (no match)
  1038.  
  1039.  
  1040. This works because the routing process in the net code  will,  when  presented
  1041. with  an  address, search for an exactly matching entry.  Failing to find that
  1042. it will then look for an address that matches on the most significant 31 bits,
  1043. then  30  bits, and so on.  If presented with the address 44.96.0.67 IP would,
  1044. after 6 tries, match the address to the example given above.
  1045.  
  1046. By judiciously assigning addresses we can make the address aid us  in  routing
  1047. the  packets.   The  users within a LAN should have something in common in the
  1048. high order part of the address so that we can use a single entry in the  rout-
  1049. ing  table  to make things go in the proper direction.  Here in the Washington
  1050. DC area all addresses begin with 44.96.0.  This identifies this  general  area
  1051. and may be used to provide routing to us.  Once the packet arrives in our gen-
  1052. eral area cluster routing is then used to further route  the  packets  to  the
  1053. appropriate  area.  In DC and the parts of Maryland immediately surrounding DC
  1054. the low order byte ranges from 0 to 63.  Northern Virginia users  get  numbers
  1055. in  the range of 64 to 127.  The Baltimore users get 128 to 191 while the Har-
  1056. risburg, PA, users get 192 to 255.  The idea being that we can use the top two
  1057. bits in the low order byte of the address to identify LANs within the address.
  1058. That way the bits in the high order part of the address will get you into  the
  1059. general area, the next part of the address will get you to the proper LAN, and
  1060. the least significant bits will get you to the proper host or user.
  1061.  
  1062. 3.2.5.9.  Routing Loops and the Time To Live (TTL) Command:
  1063.  
  1064. It is quite possible (and likely!) to make  errors  when  setting  up  routing
  1065. tables  that  will cause a routing loop to occur (a routing loop is a circular
  1066. path that never reaches the intended destination).  Imagine what would  happen
  1067. if two stations had their default routing pointing at each other like this:
  1068.  
  1069.         host 1 (44.96.0.1): route add default ax0 [44.96.0.2]
  1070.         host 2 (44.96.0.2); route add default ax0 [44.96.0.1]
  1071.  
  1072.  
  1073. In this case a packet that got routed using the  default  route  would  bounce
  1074. back  and forth between the two stations forever.  There is a command that can
  1075. prevent this from going on forever: the Time-To-Live (ttl) command.  Every  IP
  1076. packet  has a ttl field in it that is decremented by 1 at every hop.  When the
  1077. ttl field reaches zero and the packet is not at the destination the packet  is
  1078. discarded and an ICMP message explaining the fact is sent to the sending host.
  1079. Normally net sets the ttl field to 255.  If you know that no host is more than
  1080. 5 hops away you might issue the following command:
  1081.  
  1082.         ip ttl 5
  1083.  
  1084.  
  1085. This means that all packets from your host/station are sent with ttl set to an
  1086. initial  value  of  5.   These  packets  will now be discarded if they haven't
  1087. reached their destination after 5 hops.  This limits the traffic in  the  net-
  1088. work should somebody inadvertently create a routing loop.
  1089.  
  1090. 3.2.6.  Using Digipeaters and the ARP Add Command (packet radio only):
  1091.  
  1092. Since there may not be many TCP users in your area you may need to use a digi-
  1093. peater  (or  two) to reach the other users in your area.  This is now possible
  1094. by adding entries to the ARP (Address Resolution Protocol) tables.  ARP serves
  1095. to map IP addresses into Ethernet or AX25 address, whichever is appropriate to
  1096. the media in use.  ARP  normally  does  its  work  automatically  by  directly
  1097. conversing  with  the other station but it cannot do that if the other station
  1098. is reachable only via a digipeater. In that case you must "hard-wire"  an  ARP
  1099. table entry with the ARP ADD command.
  1100.  
  1101. Before you can use the ARP ADD command you must know the  path  to  the  other
  1102. station.   Let us assume that the station with whom you wish to communicate is
  1103. WA4OIE (Other Internet Experimenter) whose address  is  44.96.0.247,  but  the
  1104. only path available is via WB3PID (Poor Inefficient Digipeater).  In this case
  1105. you will use the following ARP ADD command:
  1106.  
  1107.         arp add [44.96.0.247] ax25 wa4oie wb3pid
  1108.         - or -
  1109.         arp add wa4oie ax25 wa4oie wb3pid
  1110.  
  1111.  
  1112. From this point on packets sent over an AX25 link to address 44.96.0.247  will
  1113. use  the  AX25  destination  address of WA4OIE with an intermediate digipeater
  1114. address of WB3PBD.  If you need to use more than one digipeater it is  permis-
  1115. sible.   Just  place  the call signs of the digipeaters sequentially following
  1116. the destination AX.25 address.
  1117.  
  1118. 3.2.7.  Window and Maximum Segment Sizes:
  1119.  
  1120. The next information we want to include is some information  used  by  TCP  to
  1121. determine  how much data it can send at one time and how much data may be out-
  1122. standing before it stops to wait for an ack from the other end.  Here are  the
  1123. example values:
  1124.  
  1125.         tcp mss 216
  1126.         tcp window 648
  1127.  
  1128.  
  1129. The parameter mss stands for maximum segment size and represents  the  largest
  1130. single  segment  that  TCP  will send.  Mss should be set as a function of the
  1131. quality of the link over which you are running.  Relatively  error-free  links
  1132. should  use  larger values of mss.  If you are running on amateur packet radio
  1133. and wish to operate unattended you should probably limit this value to 216 (an
  1134. mss of 216 will cause you to send AX.25 packets that are 256 bytes long.
  1135.  
  1136. The net program now compares the mss value and the mtu  values  given  in  the
  1137. attach command for the media being used.  Since TCP and IP each have a 20 byte
  1138. header (a total of 40 bytes), an mss of 216 corresponds to an mtu of 256.   If
  1139. you  are using mixed mtu's, i.e. 256 for AX.25, 1500 for Ethernet, and 576 for
  1140. SLIP, set the mss to correspond to the largest mtu you are using and  let  net
  1141. adjust the mss downward for the media that are using smaller values for mtu.
  1142.  
  1143. The 'window' parameter is how many bytes may be outstanding at  any  one  time
  1144. before  you  wait for an ack.  If you have a pretty good link you can increase
  1145. the value of mss.  If window is larger than mss TCP will run as a sliding win-
  1146. dow  protocol, e.g.  continue to send packets while waiting for ACKs on previ-
  1147. ously sent packets.  Since TCP uses selective reject (resend ONLY  those  seg-
  1148. ments that were damaged or lost) this is not a very expensive proposition.  In
  1149. any case window should always be a multiple of mss to prevent the transmission
  1150. of small packets every once in a while.
  1151.  
  1152. If you are running on a radio channel at 1200 baud remember that a  1024  byte
  1153. transmission  will  take  seven seconds, a time that can make you unpopular if
  1154. you have to share the frequency with AX.25 TNCs that cannot adapt to the  high
  1155. channel  utilization.   In  those cases it is probably better to reduce window
  1156. and/or mss values.  The above values will make you fit in reasonably with your
  1157. other AX.25 neighbors.  Remember that the efficiency of large packets and long
  1158. transmissions are probably not worth having your neighbors so angry that  they
  1159. tie a rope between your coax and the bumper of a pickup truck so that they can
  1160. non-surgically remove your station from your shack.
  1161.  
  1162. One last point before we move on; the mss and window values that you set  will
  1163. be the ones that your TCP will ask the OTHER station to use.  When the session
  1164. is initially set up the two TCPs will exchange mss and  window  values.   This
  1165. permits stations to automatically adjust to the capabilities of the other sta-
  1166. tion.  For this reason it is best to get everyone in your LAN to use the  same
  1167. values.
  1168.  
  1169. 3.2.8.  Starting the Servers:
  1170.  
  1171. Next you need to decide what services you will provide to other users  in  the
  1172. network.   You  must  start the servers or others won't be able to make use of
  1173. your system for mail or file transfers.  You will simply be a switch for other
  1174. users  (in  fact, for a switch on a hill that may be just what you want).  You
  1175. will still be able to initiate file transfers or telnet sessions  but  no  one
  1176. will  be  able to initiate one with you.  Should you fail to start the servers
  1177. anyone trying to access those services on your machine  will  just  receive  a
  1178. "Closed, (reset)" message.  For the sake of consistency you will probably want
  1179. to use the start command to enable the following services:
  1180.  
  1181.         start telnet
  1182.         start ftp
  1183.         start smtp
  1184.         start echo
  1185.         start discard
  1186.  
  1187.  
  1188. Telnet is the terminal-to-host and terminal-to-terminal mode, ftp is the  file
  1189. transfer  protocol,  smtp  is the mail system (simple mail transfer protocol),
  1190. and echo is the echo server (it just sends back any  packets  it  receives  --
  1191. good for finding out if a switch is out there and running). The discard server
  1192. simply throws away anything it receives.  The echo  and  discard  servers  are
  1193. generally used for testing a link.
  1194.  
  1195. 3.3.  Running the network program NET.EXE
  1196.  
  1197. Start the networking program running by issuing the command "net."  You should
  1198. be rewarded by having the "net>" prompt appear on your screen. If you prepared
  1199. AUTOEXEC.NET as described in the previous section then you don't need to issue
  1200. any configuration commands.  If you have not set up AUTOEXEC.NET you will want
  1201. to read that section of the manual prior to proceeding with this section.
  1202.  
  1203. 3.3.1.  Operating Modes:
  1204.  
  1205. Net provides two modes of operation: command and session.  In the command mode
  1206. you  are  interacting  with the command interpreter to permit you to establish
  1207. sessions, retrieve status information, establish new  routing  table  entries,
  1208. etc.   Please  consider  the  commands  you  were  required  to  enter  in the
  1209. AUTOEXEC.NET file.  All of those commands were directed at the command  inter-
  1210. preter.   You  can  tell  that  the NET.EXE command interpreter is waiting for
  1211. input because it will present this prompt:
  1212.  
  1213.         net>
  1214.  
  1215.  
  1216. The session mode is unique to the session with which you wish to  communicate.
  1217. TELNET  (terminal-to-host and terminal-to-terminal) and FTP (the File Transfer
  1218. Protocol) are the two types of sessions with which you may interact  and  each
  1219. has its own sets of commands and operating modes.
  1220.  
  1221. Before you get too carried away with trying things it is probably a good  idea
  1222. to  read  at  least  as  far as the discussion on multiple sessions. That will
  1223. explain how to start and use TELNET and FTP as well as how  to  keep  straight
  1224. all the activity from multiple users.
  1225.  
  1226. 3.3.2.  Running TELNET:
  1227.  
  1228. TELNET is used to provide terminal mode access to a host computer  system  but
  1229. may  also be used to have a terminal-to-terminal "chat" with another operator.
  1230. There are three commands directly associated  with  the  TELNET  service:  the
  1231. 'telnet', the 'eol', and the 'echo' commands.  ,NH 4 The 'telnet' command:
  1232.  
  1233. The 'telnet' command is used to establish a TELNET session with a  remote  TCP
  1234. socket,  usually  the  TELNET  server on a remote host.  To establish a TELNET
  1235. session you would issue the 'telnet' command as follows:
  1236.  
  1237.         telnet wb2sef
  1238.         telnet [44.96.0.2]
  1239.  
  1240.  
  1241. Both of these commands would establish a TELNET session with the TELNET server
  1242. at  WB2SEF  because  WB2SEF  is  defined  in  HOSTS.NET  as having the address
  1243. 44.96.0.2.  Note that we merely specified that we wished to establish a TELNET
  1244. session  and  the TELNET client then connected us with the TELNET server which
  1245. resides at TCP port address 23.  There is an extended syntax for the  'telnet'
  1246. command  that will let you specify the port number at the remote host to which
  1247. you wish to be connected.  Here is an example of the extended syntax:
  1248.  
  1249.         telnet [44.96.0.2] 7
  1250.         telnet wb2sef 9
  1251.  
  1252.  
  1253. In the first example TELNET is being asked to establish a  session  with  port
  1254. number  7, the echo server, at the host whose address is 44.96.0.2. The second
  1255. example also is a request to connect to the host whose  address  is  44.96.0.2
  1256. but  this  time  the  connection  is  to be made to port number 9, the discard
  1257. server.  These two ports are regularly used for test purposes, the echo server
  1258. echoing  back  everything it receives and the discard server discarding every-
  1259. thing it receives but returning a proper acknowledgement.
  1260.  
  1261. Once you have issued the 'telnet' command you will see the message "SYN  sent"
  1262. followed  a  short time later by the message "Established" (assuming that your
  1263. destination was reachable).  At this point you would be in communication  with
  1264. the  TELNET server on the other end.  If the remote host is a timesharing com-
  1265. puter (possibly running UNIX) you would very shortly be presented with a login
  1266. screen.  You may consider your keyboard and screen to be directly connected to
  1267. the remote computer at this point.
  1268.  
  1269. On the other hand maybe you were attempting to  establish  a  connection  with
  1270. another  computer  running  the  net  code.   In  that  case  you  would be in
  1271. keyboard-to-screen communication with the operator at the remote host  (assum-
  1272. ing  that  he/she  selected  the new session as the current session; a subject
  1273. that will be discussed later).  Whatever you type will  appear  on  the  other
  1274. screen and vice-versa.
  1275.  
  1276. 3.3.2.1.  The ECHO Command
  1277.  
  1278. In addition to the 'telnet' command there are the 'eol' and  'echo'  commands.
  1279. The  'echo'  command  determines  what the TELNET client will do if the remote
  1280. host offers to echo characters (what we would consider full duplex).  Here  is
  1281. the command syntax:
  1282.  
  1283.         echo accept    [the default value]
  1284.         echo reject
  1285.  
  1286.  
  1287. If the remote host is a timesharing computer you probably want it to echo your
  1288. characters back to you rather than let your local TELNET client echo the char-
  1289. acters.  This  permits  you  to  use  sophisticated  screen-oriented  programs
  1290. without  having  your  local echoing disrupt the screen display.  On the other
  1291. hand you may prefer to reject echoing in the case of a very slow network where
  1292. having  what you type appear on the screen several seconds later could be very
  1293. annoying.  Please note that the setting of this parameter has no  effect  when
  1294. entering a TELNET session with another copy of NET since NET always refuses to
  1295. echo characters.
  1296.  
  1297. 3.3.2.2.  The EOL Command
  1298.  
  1299. The 'eol' command is also used  to  adjust  the  keyboard  functionality  when
  1300. remote  echoing  has  been  negotiated.   It is used to select the appropriate
  1301. end-of-line character to be sent when the  operator  presses  the  <ENTER>  or
  1302. <RETURN> key.  Here are examples of the two options:
  1303.  
  1304.         eol standard         [the default value]
  1305.         eol unix
  1306.  
  1307.  
  1308. Should you set 'eol' to 'unix' and remote echoing is  negotiated  by  the  two
  1309. systems,  the  <RETURN>  or <ENTER> key will send an ASCII line feed character
  1310. rather than the carriage return character.  Normally this will not  be  needed
  1311. but  some UNIX system demand this.  Should the remote host not respond to your
  1312. <RETURN> key you might want to try this option.
  1313.  
  1314. To exit back to the command prompt from within a telnet session press the  F10
  1315. key.   The  'net>' prompt will appear.  This does not close the TELNET session
  1316. but merely suspends it.  Incoming data addressed to your TELNET  session  will
  1317. be  saved  until you re-enter the session (see the discussion of changing ses-
  1318. sions that follows later).
  1319. The last item of interest to the TELNET user is how to terminate a TELNET ses-
  1320. sion.   That  is  accomplished with the 'close' command.  To close the session
  1321. simply press the F10 key to return to the command prompt and enter the 'close'
  1322. command.  You should be rewarded with the sequence of messages:
  1323.  
  1324.         FIN wait 1
  1325.         FIN wait 2
  1326.         Time wait    [followed by a delay period of about 30 seconds]
  1327.         Closed (Normal)
  1328.  
  1329.  
  1330. 3.3.3.  File Transfer (FTP):
  1331.  
  1332. The File Transfer Protocol (FTP) permits you to send  and  receive  both  text
  1333. (ASCII)  and  binary (image) files.  The FTP application accepts many commands
  1334. that will permit you to create files, delete files,  change  directories,  and
  1335. copy files.  This section will guide you through the most used FTP commands.
  1336.  
  1337. 3.3.3.1.  Establishing a Session:
  1338.  
  1339. To establish an FTP session with a remote host you use the 'ftp' command.   To
  1340. establish  an  FTP  session  with WB2SEF I would use one of the following com-
  1341. mands:
  1342.  
  1343.         ftp wb2sef
  1344.         ftp [44.96.0.2]
  1345.  
  1346.  
  1347. Both commands do the same thing because of the  information  contained  in  my
  1348. HOSTS.NET  file.   After  issuing  one of the above commands you would see the
  1349. usual 'SYN sent' and 'Established' messages.  You would then be greeted  by  a
  1350. message from the remote FTP server that looked something like this:
  1351.  
  1352.         220 wb2sef.ampr FTP version 871225.5 ready at Tue Jan 19 17:57:23 1987
  1353.  
  1354.  
  1355. This message tells you that the remote FTP is ready to  accept  commands  from
  1356. you.   FTP gives you no prompt so at this point you must understand that after
  1357. issuing a command you will be notified of  the  command's  completion  but  no
  1358. further prompting for messages will occur.  One thing to note is that when FTP
  1359. sends you a message it will always be  prefixed  with  a  three-digit  number.
  1360. This  is for the benefit of computer programs that may be driving the FTP sys-
  1361. tem.  The number is for the benefit of the computer and the text  is  for  the
  1362. benefit of the user.
  1363.  
  1364. The first thing you will need to do is to log in to the remote host with  your
  1365. user  ID and your password.  Unless you have been given a specific user ID and
  1366. password by someone at the remote host you will probably log in with the guest
  1367. user ID and password.  You will send the 'user' and Here is an example:
  1368.  
  1369.         user guest
  1370.         331 Enter PASS command
  1371.         pass xyzzy
  1372.         230 Logged in
  1373.  
  1374. This exchange presumes that your user ID is "guest" and that your password  is
  1375. "xyzzy."   If  the  user  ID does not require a password you may or may not be
  1376. prompted for the password.  NET always prompts for  the  password  whether  it
  1377. needs  it  or  not.  If the remote host is running NET and has in its FTPUSERS
  1378. file an entry that uses an asterisk (*) for the password, any password will be
  1379. accepted.
  1380.  
  1381. If you enter either an invalid user ID or an invalid password the  remote  FTP
  1382. will return the following message:
  1383.  
  1384.         550 Permission denied
  1385.  
  1386.  
  1387. Simply reenter the 'user' and 'pass' commands with the proper values  and  you
  1388. will  be  logged in.  You may also enter new 'user' and 'pass' commands at any
  1389. time to change your user ID and hence your permissions as far  as  the  remote
  1390. host is concerned.
  1391.  
  1392. 3.3.4.  Manipulating Directories on the Remote Host:
  1393.  
  1394. When you log into the remote host you will be set in "your" directory  (I  put
  1395. the  word your in quotes because many people may be using that directory since
  1396. many people may be allowed to log in concurrently with the same user ID).  You
  1397. can get a directory listing of files within that directory with the 'dir' com-
  1398. mand (just like DOS).  What you will receive back from the remote host will be
  1399. a  standard  DOS directory listing.  If you would prefer a short listing, e.g.
  1400. only the names of the files, you can use the 'ls' command.  Both commands will
  1401. accept wild cards so the following commands are all valid:
  1402.  
  1403.         dir
  1404.         ls *.*
  1405.         dir *.com
  1406.         ls test*.dat
  1407.  
  1408.  
  1409. After issuing the command you will see the  following  sequence  of  responses
  1410. from the remote host:
  1411.  
  1412.         200 Port command okay
  1413.         150 Opening data connection for LIST /public
  1414.         Your directory listing will be displayed here
  1415.         Get complete, nnnn bytes received
  1416.         226 File sent OK
  1417.  
  1418.  
  1419. The end of the "150 Opening data connection ..." response will differ  depend-
  1420. ing  on  the  directory  request  you made.  If you used the 'dir' command you
  1421. would see the word "LIST."  If you used the 'ls' command  you  would  see  the
  1422. word  "NLST."   What  followed  the  "LIST" or "NLST" would be the name of the
  1423. directory you are listing.
  1424.  
  1425. In addition to listing directories you can change the directory and query  for
  1426. the  current directory.  Let us assume that for your user ID (guest) your root
  1427. directory is /public.  Let us also assume that in public you  would  find  the
  1428. three  subdirectories tcp, games, and utils. When you log in your directory is
  1429. set to /public.  Now you issue one of the following commands:
  1430.  
  1431.         cd tcp
  1432.         cd /public/tcp
  1433.  
  1434.  
  1435. The result would be the same since you were already in directory /public.  FTP
  1436. would then send you the response:
  1437.  
  1438.         257 "/public/tcp" is current directory
  1439.  
  1440.  
  1441. You may use the 'cd' command to change directory  to  any  subdirectory  below
  1442. your  home  directory  in the same way that the DOS cd command will also allow
  1443. you change directories.
  1444.  
  1445. If you are not sure what directory you are in you may  use  the  'pwd'  (print
  1446. working directory) command.  If we were to issue the command:
  1447.  
  1448.         pwd
  1449.  
  1450.  
  1451. the remote FTP would then respond:
  1452.  
  1453.         257 "/public/tcp" is current directory
  1454.  
  1455.  
  1456. as if you had just changed directories.
  1457.  
  1458. Now we get down to the meat of the matter: sending and receiving files.  Prior
  1459. to  doing  a  file transfer you need to tell FTP what type of transfer to use.
  1460. You have two choices: ASCII (text files) or Image (binary files).   To  select
  1461. what type of transfer to do you use the
  1462.  
  1463.         type i
  1464.         type a
  1465.  
  1466.  
  1467. The former will set all subsequent transfers to image mode for sending  binary
  1468. files.  The latter will set all subsequent transfers to ASCII mode for sending
  1469. or receiving text files.  If you use the 'type' command by itself like:
  1470.  
  1471.         type
  1472.  
  1473.  
  1474. FTP will respond with  either  the  word  "Image"  or  "Ascii,"  whichever  is
  1475. appropriate.   If  you  do  not  specify  a  type of transfer FTP will use the
  1476. default value "ASCII."
  1477.  
  1478. Files transferred with type set to ASCII  will  have  their  newline  sequence
  1479. translated  to  that expected by the remote host.  Files transferred with type
  1480. set to image will have no translation performed at all.  All bytes in the file
  1481. will be transferred with no changes whatsoever.
  1482. Once you select the type of transfer you desire you may then send  or  receive
  1483. files.   The  'put'  and  'get'  commands  are  used to send and receive files
  1484. respectively.  Let us assume that I have a file on my  system  in  my  current
  1485. directory  called  "foo" and I want to transfer it to the remote host and have
  1486. it placed in my current directory there.  To do this I would use the following
  1487. command:
  1488.  
  1489.         put foo
  1490.  
  1491.  
  1492. FTP would then transfer file "foo" from the local to the  remote  system.  You
  1493. would know the status of the transfer from the following sequence of messages:
  1494.  
  1495.         200 Port command okay
  1496.         150 Opening data connection for STOR foo
  1497.         Put complete, nnn bytes sent
  1498.         226 File received OK
  1499.  
  1500.  
  1501. Now let us fetch file "bar" from the remote system.  Here is your command  the
  1502. the responses from FTP:
  1503.  
  1504.         get bar
  1505.         200 Port command okay
  1506.         150 Opening data connection for RETR bar
  1507.         Get complete, nnn bytes received
  1508.         226 File sent OK
  1509.  
  1510.  
  1511. Now it may not be convenient to have the file retain its file name when it  is
  1512. copied.  Perhaps there is already a file with the same name at the destination
  1513. and you do not wish to, or may not be permitted to, overwrite  the  file.   In
  1514. that  case  you would add the destination file name to the get or the put com-
  1515. mand as follows:
  1516.  
  1517.         put foo bar
  1518.         get /public/tcp/herfile herfile
  1519.  
  1520.  
  1521. In the first example the local file "foo" would be copied to file "bar" on the
  1522. remote  system.  In the second example the file "/public/tcp/herfile" would be
  1523. copied to "herfile" on the remote system.  The reason for doing it this way in
  1524. the   second   example  is  to  avoid  having  FTP  try  to  create  the  file
  1525. "/public/tcp/herfile" on the remote end.  Perhaps there is no directory "/pub-
  1526. lic"  or "/public/tcp" or perhaps you are in an FTP session with a system that
  1527. has completely different file naming conventions (remember  that  you  may  be
  1528. communicating with systems other than PC's).
  1529.  
  1530. It is also possible to get a file and type it to your CRT  directly.   If  you
  1531. want  to  get the file to your screen use "con" as the name of the destination
  1532. file.  Here is an example that will fetch file "foo" and send it to the CRT:
  1533.  
  1534.         get foo con
  1535.  
  1536. You may at some point want to terminate a transfer that is currently  in  pro-
  1537. gress.   The 'abort' command is used for this.  There are no parameters on the
  1538. abort command.  Just type 'abort' and the current transfer will be aborted.
  1539.  
  1540. The last command of interest to FTP users is the dele command.  The dele  com-
  1541. mand  is  used to delete a file on the remote system.  Here is an example that
  1542. will delete the file foo on the remote system:
  1543.  
  1544.         dele foo
  1545.  
  1546.  
  1547. Remember that in order to use the  dele  command  you  must  have  delete  and
  1548. overwrite permission on the remote system.
  1549.  
  1550. When done using FTP use the command 'quit.'  'Quit' will get you the following
  1551. message sequence:
  1552.  
  1553.         221 Goodbye!
  1554.         Close wait
  1555.         Last ACK
  1556.         Closed (Normal)
  1557.  
  1558.  
  1559. All of this indicates  that  FTP  has  properly  terminated  the  session  and
  1560. returned  you  to  the command interpreter.  Alternatively, you can just close
  1561. the session by hitting F10 and typing "close".
  1562.  
  1563. 3.3.5.  Multiple Sessions:
  1564.  
  1565. One of the many advantages of NET is that it permits you to establish  several
  1566. sessions  concurrently.  For instance, you could establish an FTP session with
  1567. a host and then switch back to the command interpreter so that you could start
  1568. another  session.   The  nice thing about this is that it in no way interferes
  1569. with any sessions that are already running.  Your  FTP  session  continues  to
  1570. transfer  data  even  while you enter into a TELNET session with the same or a
  1571. different host.  Any screen output that arrives for a session that is not  the
  1572. currently  selected  session will be held until you again select that session.
  1573. This prevents you from losing any output while you interact with another  ses-
  1574. sion or with the command interpreter.
  1575.  
  1576. As mentioned, in order to start a new session (or issue any other type of com-
  1577. mand  for  that  matter) you must be interacting with the command interpreter.
  1578. To get to the command prompt you need only press  F10.  Once  at  the  command
  1579. prompt  you  can  examine  or select a new session using the 'session' command
  1580. (abbreviated 'se').
  1581.  
  1582. The session command when used by itself will  give  you  a  list  of  all  the
  1583. currently open session.  Here are two examples:
  1584.  
  1585.         session
  1586.         se
  1587.  
  1588.  
  1589. The result will be a display similar to the following:
  1590.  
  1591.          #  &CB  Type    Rcv-Q  State        Remote socket
  1592.          0  c7a8 Telnet      0  Established  w3fws:23
  1593.         *1  c434 FTP         0  Established  44.96.0.13:21
  1594.  
  1595.  
  1596. The first field (#) is the session number.  The asterisk  (*)  identifies  the
  1597. current  session.   CB is the protocol control block associated with this ses-
  1598. sion (these are explained in detail as part of the tcp status and ax25  status
  1599. commands later in this document).  The Type field identifies the session as an
  1600. FTP, a TELNET, or an AX.25 connected mode  (TNC)  session.   The  state  field
  1601. indicates  the  state of the "connection" as far as this session is concerned.
  1602. A value of SYN Sent indicates that the "connection" is in the process of being
  1603. constructed.   A  value  of  Established  indicates  that the "connection" and
  1604. therefore the session is open and ready to transfer  information.   Values  of
  1605. FIN  Wait  1,  FIN  Wait 2, or Time Wait indicate that the connection is being
  1606. closed.  The last field, Remote Socket, identifies the host and port with whom
  1607. the session was initiated.
  1608.  
  1609. Once you start a session it becomes your current session unless you  close  it
  1610. or switch to another session.  To get back to a session from the 'net>' prompt
  1611. all you need to do is press the <RETURN> or <ENTER> key.  If you  happened  to
  1612. close  the  current  session  there  will be no current session.  In that case
  1613. pressing <RETURN> or <ENTER> will have no effect.  You will need to explicitly
  1614. select a new session with the session command.
  1615.  
  1616. If you follow the session command with a number, the session command will make
  1617. the session whose number was specified, the current session and then turn con-
  1618. trol of the keyboard and screen over to that session.  Here are two examples:
  1619.  
  1620.         session 0
  1621.         se 0
  1622.  
  1623.  
  1624. Both of these examples change the current session to session 0.  At that point
  1625. you will be interacting with the desired session.
  1626.  
  1627. As mentioned in the section on the 'telnet' command you close a  session  with
  1628. the  close  command.  If the session you wish to close is not the current ses-
  1629. sion you need to issue the command 'close n' where n is the number of the ses-
  1630. sion you wish to close.
  1631.  
  1632. Last of all you may need to abort a session or an open socket.  This may occur
  1633. when you have a session with another host and that host goes away for whatever
  1634. reason (power failure, hardware failure, link failure, etc.).   In  that  case
  1635. you  must resort to the 'reset' command.  The without having to go through the
  1636. normal closing sequence.  There are two forms. The first  is  the  command  or
  1637. 'ax25  reset'  followed  by  the  address  of  TCP  or AX.25 control block, as
  1638. appropriate.  Here are several examples:
  1639.  
  1640.         tcp reset c7a8
  1641.         reset 0
  1642.  
  1643. Either command would force TCP to close the socket associated with the session
  1644. with  44.96.0.13 and hence close that session.  It would give no indication to
  1645. the other end that the socket had been closed.  The only indication  that  the
  1646. other  end  would receive would be to receive a reset instead of an ACK packet
  1647. the next time the remote end sent a packet of data.
  1648.  
  1649. 3.3.6.  Status Monitoring and Other Commands:
  1650.  
  1651. There are quite a few commands in NET.EXE.  Many of  them  were  explained  in
  1652. conjunction  with  the installation instructions and, in fact, have little use
  1653. beyond initialization.  Commands in this category include:
  1654.  
  1655.         ip address------setting your IP address
  1656.         ax25 mycall-----setting your AX.25 link address
  1657.         ip ttl----------initial time-to-live field for IP packets
  1658.         attach----------starting a driver for a particular hardware device
  1659.         tcp mss---------setting the maximum size for a TCP segment (packet)
  1660.         tcp window------setting the maximum number of un-acked bytes
  1661.         ax25 digipeat---enable/disable AX.25 digipeating
  1662.         hostname--------set the name for your system (used by FTP)
  1663.  
  1664.  
  1665. On the other hand there are quite a few commands that you will be using exten-
  1666. sively.  Let's start by covering the status commands.
  1667.  
  1668. 3.3.6.1.  Getting Status Information:
  1669.  
  1670. 3.3.6.1.1.  ip status
  1671.  
  1672. The first of the status commands is 'ip status' and may be abbreviated  'ips'.
  1673. This  returns  information  about  the  status  of IP packets that have passed
  1674. through your system: e.g. originated, received, or passed through  (switched).
  1675. The format for the ip status response looks like this:
  1676.  
  1677.         total 973 runt 0 len err 0 vers err 0 chksum err 5 badproto 0
  1678.  
  1679.  
  1680. The 'total' field (973 in this case) identifies the  number  of  IP  datagrams
  1681. that  have passed through your system.  The next field, 'runt', identifies the
  1682. number of packets that were below minimum acceptable size.  'Len err'  identi-
  1683. fies  the number of packets with length errors.  'Vers err' identifies packets
  1684. that came from a system running a version of IP that is incompatible with  the
  1685. one  that  you are running (unlikely to occur unless the Internet adopts a new
  1686. standard for IP).  'Chksum err' is the number of packets that arrived  with  a
  1687. checksum  error  on the IP header (these packets will be discarded because the
  1688. system has no way of knowing if any of the information is valid).   'Badproto'
  1689. identifies the number of packets that arrived with the protocol identifier set
  1690. to an upper layer protocol (ULP) that is not either ICMP, TCP or UDP (the only
  1691. three ULP's currently supported in NET.EXE).
  1692.  
  1693. Of all these possible errors you are likely to see only the runt, len err, and
  1694. chksum  err  fields increment.  Version and bad protocol errors can only occur
  1695. if you are communicating with a system that supports a different version or  a
  1696. different set of ULP's.  This is unlikely to happen.
  1697.  
  1698. 3.3.6.1.2.  tcp status
  1699.  
  1700. Another often used command is the tcp status command.  tcp  status  returns  a
  1701. great  deal  of  information  on the current status of your TCP "connections."
  1702. Upon entering the command 'tcp status' (abbreviated 't  s')  the  system  will
  1703. print  a  General status on the TCP activity and an abbreviated display on the
  1704. status of each TCP session.  The top line looks like this:
  1705.  
  1706.         Conout 5 Conin 17 Reset out 2 Runt 0 Checksum err 1 bdcsts 0
  1707.  
  1708.  
  1709. at your system while 'conin' is the number of incoming "connections" that have
  1710. been  made  with  your  system.  'Reset out' is the number of resets that were
  1711. sent to remote systems (this would happen if a remote system attempted to send
  1712. data  to  a  socket  that had been closed).  The 'Runt' field is the number of
  1713. undersized packets that were received.  The 'Checksum err' field is the number
  1714. of  TCP segments that were discarded because the segment failed the TCP check-
  1715. sum check (IP checksums only the packet header while TCP  applies  a  checksum
  1716. test  to  the  entire TCP segment including header).  The last field indicates
  1717. the number of broadcast messages that have been received.
  1718.  
  1719. Following the header line a table is presented,  one  line  per  socket.   The
  1720. headings appear as follows:
  1721.  
  1722.         &TCB  Rcv-Q  Snd-Q   Local Socket      Remote Socket   State
  1723.  
  1724.         f784    17      0    44.96.0.1:1001    44.96.0.2:23    Established
  1725.         eb30     0      0    44.96.0.1:23      0.0.0.0:0       Listen (S)
  1726.  
  1727.  
  1728. In the above example there are two open sockets.  The first,  associated  with
  1729. the TCP Control Block (TCB) at address f784, is a TELNET (terminal-to-terminal
  1730. or terminal-to-host) session with the system whose address is 44.96.0.2.   The
  1731. second  socket, described by the TCB at location eb30, is a passive ("server")
  1732. open that exists to  accept  incoming  TELNET  connections.  Now  for  a  more
  1733. comprehensive description of the fields.
  1734.  
  1735. The TCB is the TCP control block.  The number, in hex, is the address  of  the
  1736. TCB  in  memory and serves to identify a particular open socket.  Rcv-Q is the
  1737. number of octets (8-bit things that we normally call  bytes)  that  have  been
  1738. received  and are waiting to be processed (this is one way to tell if you have
  1739. received information from another station if you are involved in more than one
  1740. TELNET or FTP session).
  1741.  
  1742. The next two fields, Local Socket and Remote Socket, make up  the  identifica-
  1743. tion of the connection as far as TCP is concerned.  The first part of a socket
  1744. number is the IP address.  The second part of the socket number, the part fol-
  1745. lowing  the colon, is the port number.  There are many "standard" port numbers
  1746. in use.  Here are some of the more common:
  1747.  
  1748.         Port    Application
  1749.  
  1750.          7     Echo server
  1751.          9     Discard server
  1752.         20     FTP server data port
  1753.         21     FTP server command port
  1754.         23     TELNET server
  1755.         25     SMTP server
  1756.  
  1757.  
  1758. You may see other port numbers used such as 1001, 1002, etc.  These  are  tem-
  1759. porary  ports that are used to form a unique connection (TCP identifies a con-
  1760. nection by combining the remote and local socket address in order to guarantee
  1761. uniqueness).
  1762.  
  1763. Since no two systems have the same network address the  combination  of  local
  1764. socket (address + port) and remote socket forms a unique combination.  This is
  1765. how the TCP on both ends of a "connection" identifies that connection.
  1766.  
  1767. It is possible to get even more information about a specific socket by  adding
  1768. the TCB address to the end of the tcp status command like this:
  1769.  
  1770.         tcb status f784
  1771.  
  1772.  
  1773. This will return the detailed TCP status information about the socket that  is
  1774. described by the TCB at address f784 (you get this address from the tcp status
  1775. command without a parameter).  Here is the sample format:
  1776.  
  1777. Local: 44.96.0.1:1001 Remote: 44.96.0.2:23 State: Established
  1778.       Init Seq   Unack     Next      WL1      WL2  Wind   MSS Queue   Total
  1779. Send:  328b740 328b741  328b741 dffde2e1  328b741   864   216     0       0
  1780. Recv: dffde2e0         dffde4e1                    1024           0     512
  1781. Retry 0 Timer stopped Smoothed round trip time  5500 ms
  1782.  
  1783.  
  1784. The 'Init Seq', 'Unack', 'Next', 'WL1', and 'WL2' fields have to do with TCP's
  1785. internal  flow control and sequence numbering mechanisms.  Continuous monitor-
  1786. ing of these fields gives you a good idea of the performance of the network in
  1787. terms  of  the  number  of packets lost.  The 'Wind' field shows the number of
  1788. bytes that the receiver is  ready  to  accept,  as  of  the  last  TCP  packet
  1789. received.   The  'effective  window' (the number of bytes that the transmitter
  1790. may send) is the 'Wind' value reduced by the number of bytes  "in  the  pipe",
  1791. that  is,  already sent but not yet acknowledged. This is found by subtracting
  1792. the 'Unack' value from the 'Next' value.
  1793.  
  1794. TCP often defers transmitting when it theoretically could, i.e., when there is
  1795. data  on  the  send  queue and a non-zero effective window.  This is done when
  1796. there is already data "in the pipe" but there is not enough new data to fill a
  1797. maximum  size  packet.   In this case, TCP waits for an acknowledgment for the
  1798. data already sent before sending more. This results in a stream of a few rela-
  1799. tively  large  packets instead of many small packets ("tinygrams"), for a con-
  1800. siderable efficiency improvement.
  1801.  
  1802.      NOTE: A good understanding of sliding window protocols  is  required
  1803.      to  make use of the information presented in these particular fields
  1804.      and a complete explanation is beyond the  scope  of  this  document.
  1805.      See  RFC-793  or  MIL-1778  for more details on the specific sliding
  1806.      window algorithms  used  in  TCP,  and  RFC-896  for  the  "tinygram
  1807.      avoidance" transmission strategy.
  1808.  
  1809. The 'MSS' field displays the maximum segment size; the maximum number of bytes
  1810. that may be sent as a single TCP segment (packet).
  1811.  
  1812. Both the maximum window size and MSS are "negotiated" by the TCPs  running  in
  1813. the  two  communicating  system.   Essentially  this  means  that the two ends
  1814. "agree" on the best values to use for these parameters.  When you set a  value
  1815. for window size and a value for MSS in your machine, those values are communi-
  1816. cated to the remote end when a socket is opened.  That allows the  remote  end
  1817. to  know  how  much  information you are prepared to accept and to prevent the
  1818. remote end from sending you too much information.  Remember,  the  values  for
  1819. window  and  MSS that you set on your system will be the values that the other
  1820. station will use when sending to you.  Also remember that the two ends may set
  1821. different values and still work effectively.
  1822.  
  1823. As an aside, you are permitted to change the value of MSS or WINDOW while  the
  1824. net  program is running.  On the other hand, changing the value of MSS or WIN-
  1825. DOW after a socket has been opened will have no effect on any  currently  open
  1826. sockets.   Open sockets will continue to use the value for MSS that they nego-
  1827. tiated when the socket was opened.  The changed values will be used  when  TCP
  1828. opens a new socket.
  1829.  
  1830. The Queue field indicates how many bytes of data are waiting at  a  particular
  1831. socket.   In  the  case  of  the send queue this field indicates the number of
  1832. bytes transmitted but not yet acknowledged.  During SMTP and FTP  sessions  it
  1833. is not unusual to see this value equal to the window size.  In the case of the
  1834. receive queue the value indicates the number of bytes that have been  received
  1835. but have not been "picked-up" by the application.
  1836.  
  1837. The Total field indicates the number of  bytes  that  have  been  received  or
  1838. transmitted on a socket since the socket was opened.  This information is very
  1839. useful during an FTP session because it will tell  you  the  total  number  of
  1840. bytes transferred on the file (FTP opens a new data socket for every transfer,
  1841. closing the socket when the transfer is complete).  If you know  the  size  of
  1842. the  file  ahead of time you can use this information to determine how much of
  1843. the file has reached the receiving end -- nice information to know when  doing
  1844. a long file transfer over a slow or unreliable link.
  1845.  
  1846. The next field is the retry counter.  If a segment is not acknowledged  within
  1847. an  appropriate period TCP will retransmit that segment because it will assume
  1848. that the segment was lost somewhere in the network.  Each time it  retransmits
  1849. a  segment  the  'Retry'  counter  is incremented.  TCP never gives up sending
  1850. data.  It does 'back off' and send segments less and less frequently in  order
  1851. to reduce network loading.
  1852.  
  1853. The next field is the 'Timer' field.  It displays the status of the timer  for
  1854. this  particular  socket.  If TCP is waiting for an acknowledgement to an out-
  1855. standing segment there will be a time displayed in this field.  If  there  are
  1856. no outstanding segments the word "stopped" will indicate that the timer is not
  1857. running.
  1858.  
  1859. The last field, 'round trip time', is a very interesting piece of information.
  1860. It is the amount of time that TCP has determined that it takes for an outgoing
  1861. segment to arrive at its destination and for its  acknowledgement  to  return.
  1862. This  value  is  used to determine the proper setting for the retry timer thus
  1863. allowing TCP to adapt to the changing conditions of the underlying network and
  1864. to prevent the network from being flooded by unnecessary retransmissions.
  1865.  
  1866. The tcp status command is probably the most-used command in the  net  program.
  1867. Don't  be afraid of it, use it!  You may not understand all the fields but you
  1868. will quickly pick up what is important and what  you  can  ignore.  Experiment
  1869. with  it so that you understand it better.  It is a key to pinpointing network
  1870. performance problems.
  1871.  
  1872. 3.3.6.2.  udp status
  1873.  
  1874. The next status command of interest is 'udp status,' used for  getting  status
  1875. information  about  information  that  has been received for the User Datagram
  1876. Protocol (UDP) ULP.  This command may be abbreviated 'u.' When an  application
  1877. makes  use of the UDP transport service it opens a UDP socket.  The udp status
  1878. command will display the status of the transport service and of  each  of  the
  1879. open sockets.  Here is an example of the output of a udp status command:
  1880.  
  1881.         sent 51 rcvd 50 bdcsts 0 cksum err 0 Unknown Socket 9
  1882.         &UCB  Rcv-Q  Local Socket
  1883.  
  1884.         ff38    293  44.96.0.1:3
  1885.  
  1886.  
  1887. In this example the 'sent' and 'rcvd' fields indicate how many  UDP  datagrams
  1888. have  been  sent and received respectively.  The 'bdcsts' field identifies the
  1889. number of broadcast datagrams that have been received.  The 'cksum err'  field
  1890. indicates  how  many  datagrams  have been received with errors while the that
  1891. were addressed to unknown (unopened) sockets.
  1892.  
  1893. Following the general information is the specific information about all of the
  1894. currently  open sockets.  Each open socket is identified by the address of its
  1895. UDP Control Block (&UCB).  Following that is the number  of  bytes  that  have
  1896. been  received and placed on the receive queue (Rcv-Q).  Last comes the actual
  1897. socket identifier consisting of the IP  address  concatenated  with  the  port
  1898. number.
  1899.  
  1900. 3.3.7.  AX.25 connected mode operation:
  1901.  
  1902. In addition to the TCP/IP mode of operation this new version  of  NET.EXE  now
  1903. supports  fully  connected  AX.25 (TNC-to-TNC) operation for talking to BBS'es
  1904. and your buddies without TCP/IP.  When NET.EXE is  running  you  are  free  to
  1905. establish  both  TCP and AX.25 sessions.  When you make an AX.25 connection it
  1906. will be treated like a TELNET session.  You can use  the  session  command  to
  1907. switch between sessions at will.  This prevents the output from one AX.25 ses-
  1908. sion from interfering with other sessions.  To make a connection you  use  the
  1909. connect  command  which  is very similar to the TNC's connect command with the
  1910. exception of the addition of a channel identifier.  Here are some examples:
  1911.  
  1912.         connect ax1 wa3pxx
  1913.         connect ax2 n4qq k3af-10
  1914.  
  1915.  
  1916. The first command starts a connection to  wa3pxx  directly  over  the  channel
  1917. labeled  ax1  (see the attach command).  The second example establishes a con-
  1918. nection to n4qq via the k3af-10 digipeater on channel ax2.   To disconnect you
  1919. use either the disconnect command or the close command.
  1920.  
  1921. The other commands for AX.25 are very familiar to a user of a TNC.  Here is  a
  1922. list of commands and a brief description of their meanings:
  1923.  
  1924.         ax25 digipeat [on|off]          turn digipeating on or off
  1925.  
  1926.         ax25 maxframe [n]               set the maximum number of outstanding
  1927.                                         frames (packets) to n where n is between
  1928.                                         1 and 7 inclusive.
  1929.  
  1930.         ax25 mycall [<call>]            Set the call sign for AX.25 frames
  1931.  
  1932.         ax25 paclen [n]                 Set the maximum size of an AX.25 I-field
  1933.  
  1934.         ax25 status                     Display a status much like tcp status.
  1935.                                         If you follow it with an ACB address it
  1936.                                         will display detailed info about a
  1937.                                         particular connection.
  1938.  
  1939.         ax25 t1 [n]                     Displays or sets the value of the
  1940.                                         retransmission timer (FRACK).  The value
  1941.                                         is in seconds.
  1942.  
  1943.         ax25 t2 [n]                     Displays or sets the value of the
  1944.                                         ack delay timer (RESPTIME) in seconds.
  1945.  
  1946.         ax25 t3 [n]                     Displays or sets the value of
  1947.                                         "keep alive" timer (CHECK) in seconds.
  1948.  
  1949.         ax25 window [n]                 Displays or sets the number of bytes
  1950.                                         that may be on the AX.25 receive queue
  1951.                                         before the host begins sending RNR
  1952.                                         frames.
  1953.  
  1954.  
  1955. 3.4.  Using connected mode AX.25 for moving IP datagrams:
  1956.  
  1957. Since connected mode AX.25 is now supported these connections may be used  for
  1958. both  host-to-TNC (chatting with your TNC-only equipped buddy or with the BBS)
  1959. and for connected mode IP channels.  With IP you have your choice  of  "uncon-
  1960. nected"  or  "connected"  packets.  The command that controls this is the mode
  1961. command.  The mode command allows you to select which style of connection will
  1962. be used on a particular interface.  Here are two examples:
  1963.  
  1964.  
  1965.         mode ax0 vc
  1966.         mode ax1 datagram
  1967.  
  1968.  
  1969. In the first example the interface named ax0 will use "connected" mode  AX.25.
  1970. This  can  improve  the link reliability and hence throughput when the link is
  1971. somewhat marginal.  The second example causes your IP datagrams to be sent  in
  1972. UI frames (unproto or beacon packets).  This is the mode of choice on reliable
  1973. links where very few packets are lost. It  reduces  overhead  so  packets  are
  1974. transferred more rapidly.
  1975.  
  1976. 3.5.  Tracing and Monitoring:
  1977.  
  1978. NET.EXE has the most comprehensive and informative  tracing  features  I  have
  1979. seen  in any software package for packet radio.  The trace function understand
  1980. AX.25, IP, TCP, and NET/ROM.
  1981.  
  1982. Tracing is enabled for each interface individually.  You have  the  choice  of
  1983. tracing incoming packets, outgoing packets, or both.  The format for the trace
  1984. command is:
  1985.  
  1986.         trace <interface> TIO
  1987.  
  1988.  
  1989. where <interface> is the name of the interface to be traced, T  is  the  trace
  1990. mode,  I  is  for incoming packets, and O is for outgoing packets. T, I, and O
  1991. are digits.  The following table gives the values for T and their meanings:
  1992.  
  1993.         0       Trace headers only.  Do not display the data.
  1994.  
  1995.         1       Trace headers and data.  Display the data as ASCII, 64
  1996.                 characters to a line.
  1997.  
  1998.         2       Trace headers and data.  Display the entire packet as Hex and
  1999.                 ASCII with 16 bytes displayed per line.
  2000.  
  2001.  
  2002. The values for I and O are either 1 or 0 depending on whether or not you  want
  2003. the  respective  incoming  or  outgoing  packets traced or not.  Here are some
  2004. examples:
  2005.  
  2006.         trace ax0 010
  2007.         trace ax1 111
  2008.         trace ax0 201
  2009.  
  2010.  
  2011. In the first example incoming packets on interface ax0 will  be  traced.  Only
  2012. the headers will be displayed.  The second example show both incoming and out-
  2013. going packets on ax1 being traced.  Data in the packets will be  displayed  as
  2014. 64  ASCII  characters  on a line.  The last example will display a hex dump of
  2015. all packets being transmitted on ax0.
  2016.  
  2017. I recommend using trace liberally.  You will learn a lot  about  packet  radio
  2018. when  you can see what is being sent and to whom.  The trace display separates
  2019. the different headers at the different layers.  Trace will display  the  link,
  2020. network, and transport layer headers separately so you can see their relation-
  2021. ship.
  2022.  
  2023. 3.6.  Running NET and BM Concurrently
  2024.  
  2025. In order to get the greatest use out of NET it is important to have it running
  2026. all the time.  The problem with that is that DOS is not a multitasking operat-
  2027. ing system.  It is very frustrating to have to start and stop NET  every  time
  2028. you want to do something else.  There are solutions: DoubleDos and DesqView.
  2029.  
  2030. The DoubleDos and DesqView packages from SoftLogic  Solutions  and  Microsoft,
  2031. respectively,  solve  this  problem. They permit you to split your memory into
  2032. two partitions (or more, for DesqView) and allow each program to operate as if
  2033. it  had its own PC.  Phil Karn wrote NET with these "multitaskers" in mind and
  2034. even included the necessary code in NET so that it can effectively reside with
  2035. other  programs  without performance penalties to either NET or the other pro-
  2036. grams.  This will also allow you to send and receive mail with BM while NET is
  2037. still  running.   That  way  you will not have to exit from NET every time you
  2038. want to prepare a mail message or read mail that has arrived.
  2039.  
  2040. The first step in using NET with DoubleDOS is to install  DoubleDOS  according
  2041. to  the  instructions.   Part  of  installing  DoubleDOS is to modify the file
  2042. /DDCONFIG.SYS  for  your  environment.   Many  things  can   be   changed   in
  2043. DDCONFIG.SYS  but  two  are  important to NET: size and program to load in the
  2044. bottom partition.  When you edit DDCONFIG.SYS you  will  find  a  field  named
  2045. 'bottom  size'  and  a  field  named  'bottom program.'  If you want NET to be
  2046. started  automatically  when  you  start  DoubleDOS  enter  the  following  in
  2047. DDCONFIG.SYS:
  2048.  
  2049.         bottom program = /NET.EXE
  2050.  
  2051.  
  2052. DoubleDOS will normally split the available memory in half.  This is  not  the
  2053. best  solution  because we know how much memory NET needs and we can then make
  2054. sure that all of the rest of the available memory is available for  the  other
  2055. partition.   NET  itself needs about 150 Kb of memory.  In addition, NET needs
  2056. COMMAND.COM also loaded in its partition.  For this reason you  will  probably
  2057. want to allocate about 175 Kb to the bottom partition where NET will run.
  2058.  
  2059. Let us assume that you want to have both DoubleDOS and  NET  start  when  your
  2060. system  boots (just what you want after a power hit).  Add the following entry
  2061. to your AUTOEXEC.BAT file:
  2062.  
  2063.         /doubledos
  2064.  
  2065.  
  2066. That will cause DoubleDOS to start and DoubleDOS will automatically start NET.
  2067.  
  2068. 3.7.  Installation on a Commodore Amiga
  2069.  
  2070. < not written yet >
  2071.  
  2072. 3.8.  Installation on an Apple Macintosh
  2073.  
  2074. < not written yet >
  2075.  
  2076. 3.9.  Installation under Unix
  2077.  
  2078. < not written yet >
  2079.  
  2080. 4.  Operational Reference
  2081.  
  2082. 4.1.  The NET.EXE Program
  2083.  
  2084. The executable file "net.exe" provides both client and server Internet facili-
  2085. ties.   It  implements  the  various ARPA protocols as both a host and gateway
  2086. (i.e., it acts as an end-user node as well as an IP packet switch for  transit
  2087. traffic).   The  keyboard and display is used by the local operator to control
  2088. both host and gateway level functions, for which a number of commands are pro-
  2089. vided.
  2090.  
  2091. 4.1.1.  Startup
  2092.  
  2093. When net.exe is executed without arguments,  it  attempts  to  open  the  file
  2094. "autoexec.net"  in  the root directory of the current drive.  If it exists, it
  2095. is read and executed as though its contents were typed on the console as  com-
  2096. mands.  This feature is useful for setting the local IP address and host name,
  2097. initializing the IP routing table, and starting the various Internet services.
  2098. If  net.exe  is  invoked  with  an  argument, it is taken to be the name of an
  2099. alternate startup file; it is read instead of autoexec.net.
  2100.  
  2101. 4.1.2.  Console mode
  2102.  
  2103. The console may be in one of two modes: command mode  and  converse  mode.  In
  2104. command mode, the prompt "net>" is displayed and any of the commands described
  2105. in the next section may be entered.  In converse mode, keyboard input is  pro-
  2106. cessed  according  to the "current session", which may be either a Telnet, FTP
  2107. or AX.25 connection.  In a telnet or AX.25 session, keyboard input is sent  to
  2108. the  remote  system  and any output from the remote system is displayed on the
  2109. console.  In an FTP session, keyboard input is first examined to see if it  is
  2110. a  known  local  command; if so it is executed locally.  If not, it is "passed
  2111. through" to the remote FTP server.   (See  the  section  titled  "FTP  Subcom-
  2112. mands").
  2113.  
  2114. The keyboard also has "cooked" and "raw" states.  In cooked  state,  input  is
  2115. line-at-a-time;  the user may use the line editing characters ^U, ^R and back-
  2116. space to erase the line, redisplay the line  and  erase  the  last  character,
  2117. respectively.   Hitting either return or line feed passes the complete line up
  2118. to the application.  In raw mode, each character is immediately passed to  the
  2119. application as it is typed.  The keyboard is always in cooked state in command
  2120. mode. It is also cooked in converse mode on an AX25 or FTP session.  In a Tel-
  2121. net session it depends on whether the remote end has issued (and the local end
  2122. has accepted) the Telnet "WILL ECHO" option.  (See the "echo" command).
  2123.  
  2124. On the IBM-PC, the user may escape back to command mode  by  hitting  the  F10
  2125. key.   On  other systems, the user must enter the "escape" character, which is
  2126. by default control-] (hex 1d, ASCII GS). (Note that this is distinct from  the
  2127. ASCII  character  of  the same name). The escape character can be changed (see
  2128. the "escape" command).
  2129.  
  2130. 4.1.3.  Commands
  2131.  
  2132. This section describes each of the commands recognized while in command  mode.
  2133. Note  that  certain  FTP subcommands, e.g., put, get, dir, etc, are recognized
  2134. only in converse mode with the appropriate FTP session; they  are  not  recog-
  2135. nized  while in command mode.  The notation "<hostid>" denotes a host or gate-
  2136. way, which may be specified in one of two ways: as a symbolic name  listed  in
  2137. the  file  "/hosts.net", or as a numeric IP address in dotted decimal notation
  2138. enclosed by brackets, e.g., [44.0.0.1]. When domain server support  is  added,
  2139. ARPA-style  domain  names  (e.g., ka9q.ampr) will also be accepted if a domain
  2140. server is available on the network to resolve them into IP addresses.
  2141.  
  2142. 4.1.3.1.  <cr>
  2143.  
  2144. Entering a carriage return (empty line) while in command mode puts you in con-
  2145. verse  mode  with  the  current  session.  If there is no current session, net
  2146. remains in command mode.
  2147.  
  2148. 4.1.3.2.  !
  2149.  
  2150. An alias for the "shell" command.
  2151.  
  2152. 4.1.3.3.  #
  2153.  
  2154. Commands starting with the hash mark (#) are ignored. This  is  mainly  useful
  2155. for comments in the autoexec.net file.
  2156.  
  2157. 4.1.3.4.  arp
  2158.  
  2159. Displays the Address Resolution Protocol table that maps IP addresses to their
  2160. subnet  (link)  addresses on subnetworks capable of broadcasting.  For each IP
  2161. address entry the subnet type (e.g., Ethernet, AX.25), subnet address and time
  2162. to  expiration  is shown. If the link address is currently unknown, the number
  2163. of IP datagrams awaiting resolution is also shown.
  2164.  
  2165. 4.1.3.5.  attach <hw type> <I/O address>  <vector>  <mode>  <label>  <bufsize>
  2166. <mtu> [<speed>]
  2167.  
  2168. Configure and attach a hardware interface to the system.
  2169.  
  2170. a.  <hw type> represents the kind of I/O device that is being  attached.   The
  2171. following types are supported:
  2172.  
  2173. 3c500   3Com 3C500 or 3C501 Ethernet interface
  2174. asy     Standard PC asynchronous interface using the National 8250
  2175. hapn    Hamilton Amateur Packet Network adapter board (Intel 8273)
  2176. eagle   Eagle Computer card (Zilog 8530)
  2177. pc100   PACCOMM PC-100 (Zilog 8530)
  2178.  
  2179. These last two interfaces are still under development; driver code included in
  2180. this package may or may not work.
  2181.  
  2182. B. <I/O address> is the base address of the control registers for the device.
  2183.  
  2184. C. <vector> is the interrupt vector number.  Both the address and  the  vector
  2185. must  be in hexadecimal. (You may put "0x" in front of these two values if you
  2186. wish, but note that they will be interpreted in hex even if you don't use it).
  2187.  
  2188. D.  <mode> controls how IP datagrams are to be encapsulated  in  the  device's
  2189. link level protocol; i.e., it selects among several link protocols that may be
  2190. available.  The choices here depend on the interface; at  present,  the  3c500
  2191. interface only supports mode "arpa", which uses standard ARPA-style encapsula-
  2192. tion.  (In the future, "802" may mean "use 802.3-style  encapsulation").   Two
  2193. modes for the "asy" device are currently supported:
  2194.  
  2195. slip    Encapsulates IP datagrams directly in SLIP frames without a link
  2196.         header. This is for operation on point-to-point lines and is compatible
  2197.         with 4.2BSD UNIX SLIP).
  2198.  
  2199. ax25    Similar to slip, except that an AX.25 header and a KISS TNC
  2200.         control header are added to the front of the datagram before SLIP
  2201.         encoding.  Either UI (connectionless) or I (connection-oriented) AX.25
  2202.         frames can be used; see the "mode" command for details.
  2203.  
  2204.  
  2205. The Address Resolution Protocol (ARP) maps IP to Ethernet addresses on  Ether-
  2206. net  controllers  and  to  AX.25  addresses on "asy" lines operating in "ax25"
  2207. mode.
  2208.  
  2209. E. <label> gives the name by which the interface will be known to the  various
  2210. commands, such as "connect", "route" and "trace".
  2211.  
  2212. F. For asynchronous ports, <bufsize> specifies the size of the ring buffer  in
  2213. bytes  to be statically allocated to the receiver; incoming bursts larger than
  2214. this may (but not necessarily) cause data to be lost.  For Ethernet, <bufsize>
  2215. specifies  how many PACKETS may be queued on the receive queue at one time; if
  2216. this limit is exceeded, further received packets will be discarded.   This  is
  2217. useful  to  prevent  the system from running out of memory should another node
  2218. suddenly develop a case of diarrhea.
  2219.  
  2220. G.  <mtu> is the Maximum Transmission Unit size, in bytes.   Datagrams  larger
  2221. than  this  limit  will be fragmented at the IP layer into smaller pieces. For
  2222. AX.25 UI frames, this limits the size of the information field.  For  AX.25  I
  2223. frames,  however, the ax25 paclen parameter is also relevant.  If the datagram
  2224. or fragment is still larger than paclen, it is also fragmented  at  the  AX.25
  2225. level  (as  opposed  to  the  IP  level)  before transmission.  (See the "ax25
  2226. paclen" command for further information).
  2227.  
  2228. H. <speed> is needed only for an "asy" line; the controller will  be  initial-
  2229. ized to the given speed.
  2230.  
  2231. Examples:
  2232.  
  2233. # Attach a 3Com Ethernet controller using the standard 3Com address and
  2234. # vector (i.e., as it comes out of the box) to use ARPA-standard encapsulation.
  2235. # The receive queue is limited to 5 packets, and outgoing packets larger
  2236. # than 1500 bytes will be fragmented
  2237. attach 3c500 0x300 3 arpa ec0 5 1500
  2238.  
  2239. # Attach the PC asynch card normally known as "com1" (the first controller)
  2240. # to operate in point-to-point slip mode at 9600 baud, calling it "sl0".
  2241. # A 1024 byte receiver ring buffer is allocated. Outgoing packets larger
  2242. # than 256 bytes are fragmented.
  2243. attach asy 0x3f8 4 slip sl0 1024 256 9600
  2244.  
  2245. # Attach the secondary PC asynch card ("com2") to operate in AX.25 mode
  2246. # with an MTU of 576 bytes at 9600 baud with a KISS TNC, calling it "ax0".
  2247. # By default, IP datagrams are sent in UI frames
  2248. attach asy 0x2f8 3 ax25 ax0 1024 576 9600
  2249.  
  2250.  
  2251.  
  2252. (Note that you cannot use the second asynch controller  ("com2")  and  a  3Com
  2253. Ethernet  card with standard addressing at the same time because they both use
  2254. interrupt vector 3).
  2255.  
  2256. ax25 digipeat [on|off] Controls whether AX.25 packets addressed to  this  sta-
  2257. tion as a digipeater will be repeated.
  2258.  
  2259. ax25 maxframe [<val]>] Establishes the maximum number of frames that  will  be
  2260. allowed  to  remain  unacknowledged at one time on new AX.25 connections. This
  2261. number cannot be greater than 7.
  2262.  
  2263. ax25 mycall [<call>] Display or set the local  AX.25  address.   The  standard
  2264. format  is  used,  e.g., KA9Q-0 or WB6RQN-5. This command must be given before
  2265. any attach command using AX.25 mode are given.
  2266.  
  2267. ax25 paclen [<val>] Limits the size of  I-fields  on  new  AX.25  connections.
  2268. Note  that if IP datagrams or fragments larger than this are transmitted, they
  2269. will be transparently fragmented at the AX.25 level, sent as  a  series  of  I
  2270. frames,  and  reassembled  back into a complete IP datagram or fragment at the
  2271. other end of the link. This parameter should be less than the MTU of the asso-
  2272. ciated interface.
  2273.  
  2274. ax25 reset <axcb> Deletes the AX.25 connection control block at the  specified
  2275. address.
  2276.  
  2277. ax25 retry [<val>] Limits the number of successive unsuccessful retransmission
  2278. attempts  on  new  AX.25  connections.  If  this  limit  is exceeded, link re-
  2279. establishment is attempted. If this fails "retry" times, then  the  connection
  2280. is abandoned and all queued data is deleted.
  2281.  
  2282. ax25 status [<axcb>] Without an argument, displays a one-line summary of  each
  2283. AX.25  control  block.   If  the  address  of  a  particular  control block is
  2284. specified, the contents of that control block are dumped in more detail.  Note
  2285. that the send queue units are frames, while the receive queue units are bytes.
  2286.  
  2287. ax25 t1 [<val>] ax25 t2 [<val>] ax25 t3  [<val>]  Display  or  set  the  AX.25
  2288. timers  to  be used for new connections. T1 is the retransmission timer, T2 is
  2289. the acknowledgement delay timer and T3 is the idle "keep alive" timer.  Values
  2290. are in seconds.
  2291.  
  2292. ax25 window [<val>] Sets the number of bytes that can be pending on  an  AX.25
  2293. receive  queue  beyond  which I frames will be answered with RNR (Receiver Not
  2294. Ready) responses.  This presently applies only to suspended interactive  AX.25
  2295. sessions, since incoming IP datagrams are always processed immediately and not
  2296. allowed to remain on the receive queue.
  2297.  
  2298. cd [<dirname>] Change the current working directory, and display the new  set-
  2299. ting.   Without  an argument, cd simply displays the current directory without
  2300. change.  The "pwd" command is an alias for "cd"
  2301.  
  2302. close [<session #>] On an AX.25 session, this command initiates a  disconnect.
  2303. On a FTP or Telnet session, this command sends a FIN (i.e., initiates a close)
  2304. on the session's TCP connection.  This is an alternative to asking the  remote
  2305. server  to  initiate a close ("QUIT" to FTP, or the logout command appropriate
  2306. for the remote system in the case of Telnet).  When either FTP or Telnet  sees
  2307. the  incoming  half  of  a  TCP connection close, it automatically responds by
  2308. closing the outgoing half of the connection.  Close is more graceful than  the
  2309. "reset"  command,  in  that  it  is  less  likely to leave the remote TCP in a
  2310. "half-open" state.
  2311.  
  2312. connect <interface> <callsign> [<digipeater> ... ] Initiates a "vanilla" AX.25
  2313. session  to  the  specified  call  sign using the specified interface. Up to 7
  2314. optional digipeaters may be given; note that the word  "via"  is  NOT  needed.
  2315. Data sent on this session goes out in conventional AX.25 packets with no upper
  2316. layer protocol.  The de-facto presentation standard format is  used,  in  that
  2317. each packet holds one line of text, terminated by a carriage return.  A single
  2318. AX.25 connection may be used for both  terminal-to-terminal  and  IP  traffic,
  2319. with  the two types of data being automatically separated by their AX.25 Level
  2320. 3 Protocol IDs.
  2321.  
  2322. dir [<dirname>] List the contents of the specified directory on  the  console.
  2323. If no argument is given, the current directory is listed.
  2324.  
  2325. disconnect [<session #>] An alias for the "close" command (for the benefit  of
  2326. AX.25 users).
  2327.  
  2328. echo [accept|refuse] Displays or changes the flag controlling client  Telnet's
  2329. response to a remote WILL ECHO offer.
  2330.  
  2331. The Telnet presentation protocol specifies that in the absence of a negotiated
  2332. agreement  to  the  contrary, neither end echoes data received from the other.
  2333. In this mode, a Telnet client session echoes keyboard input locally and  noth-
  2334. ing  is  actually sent until a carriage return is typed. Local line editing is
  2335. also performed: backspace deletes the last character  typed,  while  control-U
  2336. deletes the entire line.
  2337. When communicating from keyboard to keyboard the standard local echo  mode  is
  2338. used,  so the setting of this parameter has no effect. However, many timeshar-
  2339. ing systems (e.g., UNIX) prefer to do their own echoing of typed input.  (This
  2340. makes screen editors work right, among other things). Such systems send a Tel-
  2341. net WILL ECHO offer immediately upon receiving an incoming  Telnet  connection
  2342. request. If "echo accept" is in effect, a client Telnet session will automati-
  2343. cally return a DO ECHO response. In this mode, local echoing  and  editing  is
  2344. turned  off  and  each  key  stroke  is sent immediately (subject to the Nagle
  2345. tinygram algorithm in TCP).  While this mode is just fine across an  Ethernet,
  2346. it  is  clearly  inefficient  and  painful across slow paths like packet radio
  2347. channels. Specifying "echo refuse" causes an incoming WILL ECHO  offer  to  be
  2348. answered with a DONT ECHO; the client Telnet session remains in the local echo
  2349. mode.  Sessions already in the remote echo mode are unaffected. (Note:  Berke-
  2350. ley  Unix has a bug in that it will still echo input even after the client has
  2351. refused the WILL ECHO offer. To get  around  this  problem,  enter  the  "stty
  2352. -echo" command to the shell once you have logged in.)
  2353.  
  2354. 4.1.3.6.  eol [unix|standard]
  2355.  
  2356. Displays or changes Telnet's end-of-line behavior when in  remote  echo  mode.
  2357. In  standard  mode, each key is sent as-is. In unix mode, carriage returns are
  2358. translated to line feeds.  This command is not necessary with  all  UNIX  sys-
  2359. tems;  use  it only  when  you  find that a particular system responds to line
  2360. feeds but not carriage returns.  Only Sun UNIX release 3.2  seems  to  exhibit
  2361. this behavior; later releases are fixed.
  2362.  
  2363. 4.1.3.7.  escape <char>
  2364.  
  2365. Without arguments, displays the current command-mode escape character in  hex.
  2366. If  given  an  argument, the first character becomes the new escape character.
  2367. (This command is not provided on the IBM-PC; on the PC,  the  escape  char  is
  2368. always F10.)
  2369.  
  2370. 4.1.3.8.  etherstat
  2371.  
  2372. Display 3-Com Ethernet controller statistics (if configured).
  2373.  
  2374. 4.1.3.9.  exit
  2375.  
  2376. Exit the "net" program and return to MS-DOS (or CP/M).
  2377.  
  2378. 4.1.3.10.  ftp <hostid>
  2379.  
  2380. Open an FTP control channel to the specified remote host  and  enter  converse
  2381. mode  on  the  new  session.   Responses  from the remote server are displayed
  2382. directly on the screen.
  2383.  
  2384. 4.1.3.11.  help
  2385.  
  2386. Display a brief summary of top-level commands.
  2387.  
  2388. 4.1.3.12.  hostname [<name>]
  2389.  
  2390. Displays or sets the local host's name (an ASCII string such as "ka9q-pc", NOT
  2391. an IP address).  Currently this is used only in the greeting messages from the
  2392. SMTP (mail) and FTP (file transfer) servers.
  2393.  
  2394. 4.1.3.13.  log [stop | <file>]
  2395.  
  2396. Without arguments, indicates whether server  sessions  are  being  logged.  If
  2397. "stop" is given as the argument, logging is terminated (the servers themselves
  2398. are unaffected). If a file name is given as an argument,  server  session  log
  2399. entries will be appended to it.
  2400.  
  2401. 4.1.3.14.  ip address [<hostid>]
  2402.  
  2403. Displays or sets the local IP address.
  2404.  
  2405. 4.1.3.15.  ip status
  2406.  
  2407. Displays Internet Protocol (IP) statistics, such as total  packet  counts  and
  2408. error  counters of various types.  Also displays statistics about the Internet
  2409. Control Message Protocol (ICMP), including the number of ICMP messages of each
  2410. type sent or received.
  2411.  
  2412. 4.1.3.16.  ip ttl [<val>]
  2413.  
  2414. Displays or sets the default time-to-live value placed  in  each  outgoing  IP
  2415. datagram.  This  limits the number of switch hops the datagram will be allowed
  2416. to take. The idea is to bound the lifetime of  the  packet  should  it  become
  2417. caught  in a routing loop, so make the value somewhat larger than the diameter
  2418. of the network.
  2419.  
  2420. 4.1.3.17.  memstat
  2421.  
  2422. Displays the internal free memory list in the storage allocator.
  2423.  
  2424. 4.1.3.18.  mode <interface> [vc|datagram]
  2425.  
  2426. Controls the default transmission mode on the specified  AX.25  interface.  In
  2427. "datagram"  mode, IP packets are encapsulated in AX.25 UI frames and transmit-
  2428. ted without any other link level  mechanisms,  such  as  connections  or  ack-
  2429. nowledgements.
  2430.  
  2431. In "vc" (virtual circuit) mode, IP packets are encapsulated in AX.25 I  frames
  2432. and  are acknowledged at the link level according to the AX.25 protocol.  Link
  2433. level connections are opened if necessary.  With the  proper  setting  of  the
  2434. AX.25  T2  (acknowledgement  delay)  timer, AX.25 acknowledgements can be pig-
  2435. gybacked on I frames carrying other IP datagrams (e.g., TCP level acknowledge-
  2436. ments),  thereby  eliminating  the  extra overhead ordinarily incurred by link
  2437. level acknowledgments.
  2438.  
  2439. In both modes, ARP is used to map IP to AX.25 addresses.  The defaults can  be
  2440. overridden  with  the  type-of-service (TOS) bits in the IP header. Turning on
  2441. the "reliability" bit causes I frames to be used, while turning  on  the  "low
  2442. delay"  bit  uses UI frames.  (The effect of turning on both bits is undefined
  2443. and subject to change).
  2444. In both modes, IP-level fragmentation is done if the datagram is  larger  than
  2445. the  interface  MTU.  In virtual circuit mode, however, the resulting datagram
  2446. (or fragments) is further fragmented at the AX.25 layer if it  (or  they)  are
  2447. still  larger  than  the  AX.25  "paclen"  parameter.  In AX.25 fragmentation,
  2448. datagrams are broken into several I frames and reassembled  at  the  receiving
  2449. end before being passed to IP. This is preferable to IP fragmentation whenever
  2450. possible because of decreased overhead (the IP header isn't repeated  in  each
  2451. fragment) and increased robustness (a lost fragment is immediately retransmit-
  2452. ted by the link layer).
  2453.  
  2454. 4.1.3.19.  param <interface> [param ...]
  2455.  
  2456. Param invokes a device-specific control routine.  On  a  KISS  TNC  interface,
  2457. this  sends  control  packets  to the TNC.  Data bytes are treated as decimal.
  2458. For example, "param ax0 1 255" will set the keyup timer (type field  =  1)  on
  2459. the  KISS  TNC  configured  as ax0 to 2.55 seconds (255 x .01 sec).  On a SLIP
  2460. interface, the param command allows the baud rate to be  read  (without  argu-
  2461. ments)  or  set.  The implementation of this command for the various interface
  2462. drivers is incomplete and subject to change.
  2463.  
  2464. 4.1.3.20.  pwd [<dirname>]
  2465.  
  2466. An alias for the cd command.
  2467.  
  2468. 4.1.3.21.  record [<filename>|off]
  2469.  
  2470. Opens <filename> and appends to it all data received on the  current  session.
  2471. Data sent on the current session is also written into the file except for Tel-
  2472. net sessions in remote echo mode.  The command "record  off"  stops  recording
  2473. and closes the file. This command is not supported for FTP sessions.
  2474.  
  2475. 4.1.3.22.  reset [<session>]
  2476.  
  2477. If an argument is given, force a local reset (deletion) of the AX.25 (AXCB) or
  2478. TCP  Control  Block  (TCB) belonging to the specified session. The argument is
  2479. first checked for validity.  If no argument is given, the current session,  if
  2480. any,  is  used.   This  command  should be used with caution since it does not
  2481. inform the remote end that the connection no longer exists.  (In TCP  a  reset
  2482. (RST)  message will be automatically generated should the remote TCP send any-
  2483. thing after a local reset has been done.  In AX.25 the DM message  performs  a
  2484. similar  role.   Both  are used to get rid of a lingering half-open connection
  2485. after a remote system has crashed.)
  2486.  
  2487. 4.1.3.23.  route
  2488.  
  2489. route  add  <dest   hostid>[/bits]|default   <interface>   [<gateway   hostid>
  2490. [<metric>]] route drop <dest hostid>
  2491.  
  2492. With no arguments, "route" displays the IP routing table. "route add" adds  an
  2493. entry  to  the  routing  table,  while "route drop" deletes an existing entry.
  2494. "route add" requires at least two more arguments, the host id  of  the  target
  2495. destination and the local name of the interface to which its packets should be
  2496. sent.  If the destination is not local, the gateway's host id should  also  be
  2497. specified.  (If  the interface is a point-to-point link, then <gateway hostid>
  2498. may be omitted even if the target is non-local because this field is only used
  2499. to  determine the gateway's link level address, if any.  If the destination is
  2500. directly reachable, <gateway hostid> is also unnecessary since the destination
  2501. address is used to determine the interface link address).
  2502.  
  2503. The optional "/bits" suffix to the destination  host  id  specifies  how  many
  2504. leading  bits  in  the host id are to be considered significant in the routing
  2505. comparisons.  If not specified, 32 bits (i.e., full significance) is  assumed.
  2506. With  this  option,  a  single routing table entry may refer to many hosts all
  2507. sharing a common bit string prefix in their IP addresses.  For  example,  ARPA
  2508. Class  A, B and C networks would use suffixes of /8, /16 and /24 respectively;
  2509. the command
  2510.  
  2511.         route add [44]/8 sl0 [44.64.0.2]
  2512.  
  2513.  
  2514. causes any IP addresses beginning with "44" in the first 8 bits to  be  routed
  2515. to [44.64.0.2]; the remaining 24 bits are "don't-cares".
  2516.  
  2517. When an IP address to be routed matches more than one  entry  in  the  routing
  2518. table,  the  entry  with  largest "bits" parameter (i.e., the "best" match) is
  2519. used. This allows individual hosts or blocks of hosts to be  exceptions  to  a
  2520. more general rule for a larger block of hosts.
  2521.  
  2522. The special destination "default" is used to route datagrams to addresses  not
  2523. in  the  routing table; it is equivalent to specifying a /bits suffix of /0 to
  2524. any destination hostid.  Care must be taken with  default  entries  since  two
  2525. nodes  with  default entries pointing at each other will route packets to unk-
  2526. nown addresses back and forth in a loop until their time-to-live (TTL)  fields
  2527. expire.   (Routing  loops for specific addresses can also be created, but this
  2528. is less likely to occur accidentally).
  2529.  
  2530. "route drop" deletes an entry from the table. If  a  packet  arrives  for  the
  2531. deleted address and a default route is in effect, it will be used.
  2532.  
  2533. Here are some examples of using the route command:
  2534.  
  2535.         # Route datagrams to IP address 44.0.0.3 to SLIP line #0.
  2536.         # No gateway is needed because SLIP is point-to point.
  2537.         route add [44.0.0.3] sl0
  2538.  
  2539.         # Route all default traffic to the gateway on the local Ethernet
  2540.         # with IP address [44.0.0.1]
  2541.         route add default ec0 [44.0.0.1]
  2542.  
  2543.         # The local Ethernet has an ARPA Class-C address assignment;
  2544.         # route all IP addresses beginning with 192.4.8 to it
  2545.         route add [192.4.8]/24 ec0
  2546.  
  2547.         # The station with IP address [44.0.0.10] is on the local AX.25 channel
  2548.         route add [44.0.0.10] ax0
  2549.  
  2550. 4.1.3.24.  session [<session #>]
  2551.  
  2552. Without arguments, displays the list of current  sessions,  including  session
  2553. number,  remote  TCP or AX.25 address and the address of the TCP or AX.25 con-
  2554. trol block.  An asterisk (*) is shown next to the "current" session;  entering
  2555. <cr>  at this point will put you in converse mode with that session.  Entering
  2556. a session number as an argument to the session command will put  you  in  con-
  2557. verse  mode  with  that session.  If the telnet server is enabled, the user is
  2558. notified of  an  incoming  request  and  a  session  number  is  automatically
  2559. assigned.   The user may then select the session normally to converse with the
  2560. remote user as though the session had been locally initiated.
  2561.  
  2562. 4.1.3.25.  shell
  2563.  
  2564. Suspends "net" and executes a sub shell ("command  processor"  under  MS-DOS).
  2565. When  the  sub  shell  exits, net resumes (under MS-DOS, enter the "exit" com-
  2566. mand). Note that background activity (FTP  servers,  etc)  is  also  suspended
  2567. while the subshell executes.
  2568.  
  2569. 4.1.3.26.  smtp gateway [<hostid>]
  2570.  
  2571. Displays or sets the host to be used as a "smart" mail relay. Any mail sent to
  2572. a  hostid  not  in the host table will instead be sent to the gateway for for-
  2573. warding.
  2574.  
  2575. 4.1.3.27.  smtp kick
  2576.  
  2577. Run through the outgoing mail queue and attempt to deliver any  pending  mail.
  2578. This  command is periodically invoked by a timer whenever net is running; this
  2579. command allows the user to "kick" the mail system manually.
  2580.  
  2581. 4.1.3.28.  smtp maxclients [<val>]
  2582.  
  2583. Displays or sets the maximum number of  simultaneous  outgoing  SMTP  sessions
  2584. that  will be allowed. The default is 10; reduce it if network congestion is a
  2585. problem.
  2586.  
  2587. 4.1.3.29.  smtp timer [<val>]
  2588.  
  2589. Displays or sets the interval, in seconds, between scans of the outbound  mail
  2590. queue. For example, "smtp timer 600" will cause the system to check for outgo-
  2591. ing mail every 10 minutes and attempt to deliver anything it finds, subject of
  2592. course to the "maxclients" limit. Setting a value of zero disables queue scan-
  2593. ning altogether, note that this is the default!  This value is recommended for
  2594. stand  alone  IP gateways that never handle mail, since it saves wear and tear
  2595. on the floppy disk drive.
  2596.  
  2597. 4.1.3.30.  smtp trace [<val>]
  2598.  
  2599. Displays or sets the trace flag in the SMTP  client,  allowing  you  to  watch
  2600. SMTP's  conversations  as it delivers mail.  Zero (the default) disables trac-
  2601. ing.
  2602.  
  2603. 4.1.3.31.  start ftp|smtp|telnet|discard|echo
  2604.  
  2605. Starts the specified Internet server, allowing remote connection requests.
  2606.  
  2607. 4.1.3.32.  stop ftp|smtp|telnet|discard|echo
  2608.  
  2609. Stops the specified Internet server,  rejecting  any  further  remote  connect
  2610. requests. Existing connections are allow to complete normally.
  2611.  
  2612. 4.1.3.33.  tcp irtt [<val>]
  2613.  
  2614. Display or set the intial round trip time estimate, in seconds, to be used for
  2615. new TCP connections until they can measure and adapt to the actual value.  The
  2616. default is 5 seconds.  Increasing this when operating over slow channels  will
  2617. avoid the flurry of retransmissions that would otherwise occur as the smoothed
  2618. estimate settles down at the correct value. Note that this command  should  be
  2619. given  before  servers  are started in order for it to have effect on incoming
  2620. connections.
  2621.  
  2622. 4.1.3.34.  tcp kick <tcb_addr>
  2623.  
  2624. If there is data on the send queue of the specified tcb, this  command  forces
  2625. an immediate retransmission.
  2626.  
  2627. 4.1.3.35.  tcp mss [<size>]
  2628.  
  2629. Display or set the TCP Maximum Segment Size in bytes that will be sent on  all
  2630. outgoing  TCP  connect  request (SYN segments).  This tells the remote end the
  2631. size of the largest segment (packet) it may send. Changing  MSS  affects  only
  2632. future connections; existing connections are unaffected.
  2633.  
  2634. 4.1.3.36.  tcp reset <tcb_addr>
  2635.  
  2636. Deletes the TCP control block at the specified address.
  2637.  
  2638. 4.1.3.37.  tcp rtt <tcb_addr> <rttval>
  2639.  
  2640. Replaces the automatically computed round trip time in the specified tcb  with
  2641. the  rttval in milliseconds.  This command is useful to speed up recovery from
  2642. a series of lost packets since it provides a manual bypass around  the  normal
  2643. backoff retransmission timing mechanisms.
  2644.  
  2645. 4.1.3.38.  tcp status [<tcb_addr>]
  2646.  
  2647. Without arguments, displays several TCP-level statistics, plus  a  summary  of
  2648. all  existing  TCP  connections, including TCB address, send and receive queue
  2649. sizes, local and remote sockets, and connection state. If <tcb_addr> is speci-
  2650. fied,  a  more detailed dump of the specified TCB is generated, including send
  2651. and receive sequence numbers and timer information.
  2652.  
  2653. 4.1.3.39.  tcp window [<val>]
  2654.  
  2655. Displays or sets the default receive window size in bytes to be  used  by  TCP
  2656. when creating new connections. Existing connections are unaffected.
  2657.  
  2658. 4.1.3.40.  telnet <hostid>
  2659.  
  2660. Creates a Telnet session to the specified host and enters converse mode.
  2661.  
  2662. 4.1.3.41.  trace [<interface> [<flags>]]
  2663.  
  2664. Controls packet tracing by the interface drivers. Specific bits enable tracing
  2665. of  the various interfaces and the amount of information produced.  Tracing is
  2666. controlled on a per-interface basis; without arguments, trace gives a list  of
  2667. all  defined  interfaces and their tracing status.  Output can be limited to a
  2668. single interface by specifying it, and the control  flags  can  be  change  by
  2669. specifying  them as well. The flags are given as a hexadecimal number which is
  2670. interpreted as follows:
  2671.  
  2672.         TIO
  2673.         |||--- Enable tracing of output packets if 1, disable if 0
  2674.         ||---- Enable tracing of input packets if 1, disable if 0
  2675.         |----- Controls type of tracing:
  2676.                 0 - Protocol headers are decoded, but data is not displayed
  2677.                 1 - Protocol headers are decoded, and data (but not the
  2678.                     headers themselves) are displayed as ASCII characters,
  2679.                     64 characters/line. Unprintable characters are displayed
  2680.                     as periods.
  2681.                 2 - Protocol headers are decoded, and the entire packet
  2682.                     (headers AND data) is also displayed in hexadecimal
  2683.                     and ASCII, 16 characters per line.
  2684.  
  2685.  
  2686. 4.1.3.42.  udp status
  2687.  
  2688. Displays the status of all UDP receive queues.
  2689.  
  2690. 4.1.3.43.  upload [<filename>]
  2691.  
  2692. Opens <filename> and sends it on the current session as though it  were  typed
  2693. on the terminal. Valid only on AX.25 and Telnet sessions.
  2694.  
  2695. 4.1.3.44.  ?
  2696.  
  2697. Same as the "help" command.
  2698.  
  2699. 4.1.4.  FTP Subcommands
  2700.  
  2701. When in converse mode with an FTP server, everything typed on the  console  is
  2702. first  examined  to  see if it is a locally-known command. If not, the line is
  2703. passed intact to the remote server on the control channel. If it is one of the
  2704. following commands, however, it is executed locally. (Note that this generally
  2705. involves other commands being sent to the remote server on the  control  chan-
  2706. nel.)   When  actively  transferring  a  file,  the only acceptable command is
  2707. "abort"; all other commands will result in an error message.
  2708.  
  2709. 4.1.4.1.  abort
  2710.  
  2711. Aborts a get, put or dir operation in progress. When receiving a  file,  abort
  2712. simply resets the data connection; the next incoming data packet will generate
  2713. a TCP RST (reset) in response which will clear the remote server.  When  send-
  2714. ing a file, abort sends a premature end-of-file. Note that in both cases abort
  2715. will leave a partial copy of the file on the destination machine,  which  must
  2716. be  removed manually if it is unwanted. Abort is valid only when a transfer is
  2717. in progress.
  2718.  
  2719. 4.1.4.2.  dir [<file>|<directory> [<local file>]]
  2720.  
  2721. Without arguments, "dir" requests that a full directory listing of the  remote
  2722. server's current directory be sent to the terminal.  If one argument is given,
  2723. this is passed along in the LIST command; this can be a specific file or  sub-
  2724. directory  that  is meaningful to the remote file system. If two arguments are
  2725. given, the second is taken as the local file into which the directory  listing
  2726. should  be  put  (instead  of being sent to the console).  The PORT command is
  2727. used before the LIST command is sent.
  2728.  
  2729. 4.1.4.3.  get <remote file> [<local file>]
  2730.  
  2731. Asks the remote server to send the file specified in the first argument.   The
  2732. second  argument, if given, will be the name of the file on the local machine;
  2733. otherwise it will have the same name as on the remote machine.  The  PORT  and
  2734. RETR commands are sent on the control channel.
  2735.  
  2736. 4.1.4.4.  ls [<file>|<directory> [<local file>]]
  2737.  
  2738. ls is identical to the "dir" command except that the "NLST" command is sent to
  2739. the  server  instead  of  the  "LIST"  command. This results in an abbreviated
  2740. directory listing, i.e., one showing only the file  names  themselves  without
  2741. any other information.
  2742.  
  2743. 4.1.4.5.  mkdir <remote directory>
  2744.  
  2745. Creates a directory on the remote machine.
  2746.  
  2747. 4.1.4.6.  put <local file> [<remote file>]
  2748.  
  2749. Asks the remote server to accept data, creating the file named  in  the  first
  2750. argument.  The  second argument, if given, will be the name of the file on the
  2751. remote machine; otherwise it will have the same name as on the local  machine.
  2752. The PORT and STOR commands are sent on the control channel.
  2753.  
  2754. 4.1.4.7.  rmdir <remote directory>
  2755.  
  2756. Deletes a directory on the remote machine.
  2757.  
  2758. 4.1.4.8.  type [a | i | l <bytesize>]
  2759.  
  2760. Tells both the local client and remote server the type of file that is  to  be
  2761. transferred.  The default is 'a', which means ASCII (i.e., a text file).  Type
  2762. 'i' means "image", i.e., binary.  In ASCII mode, files  are  sent  as  varying
  2763. length  lines  of  text  in ASCII separated by cr/lf sequences; in IMAGE mode,
  2764. files are sent exactly as they appear in the file system.  ASCII  mode  should
  2765. be  used whenever transferring text between dissimilar systems (e.g., UNIX and
  2766. MS-DOS) because of their different end-of-line and/or end-of-file conventions.
  2767. When exchanging text files between machines of the same type, either mode will
  2768. work but IMAGE mode may be somewhat faster.  Naturally,  when  exchanging  raw
  2769. binary  files (executables, compressed archives, etc) IMAGE mode must be used.
  2770. Type 'l' (logical byte size) is used when exchanging binary files with  remote
  2771. servers  having  oddball  word sizes (e.g., DECSYSTEM-10s and 20s). Locally it
  2772. works exactly like IMAGE, except that it notifies the remote system how  large
  2773. the  byte size is. <bytesize> is typically 8.  The type command sets the local
  2774. transfer mode and generates the TYPE command on the control channel.
  2775.  
  2776. 4.1.5.  FTP server configuration
  2777.  
  2778. Since MS-DOS was designed as a single-user operating system,  it  provides  no
  2779. access  control;  all files can be read, written or deleted by the local user.
  2780. It is usually undesirable to give such open access to a system to remote  net-
  2781. work  users.  The FTP server therefore provides its own access control mechan-
  2782. ism.
  2783.  
  2784. The file "/ftpusers" is used to control remote FTP access.  The default is  NO
  2785. access;  if  this  file  does  not  exist, the FTP server will be unusable.  A
  2786. remote user must first "log in" to the system with the USER and PASS commands,
  2787. giving  a  valid  name  and password listed in /ftpusers, before he or she can
  2788. transfer files.
  2789.  
  2790. Each entry in /ftpusers consists of a single line of the form
  2791.  
  2792.         username password /path permissions
  2793.  
  2794.  
  2795. There must be exactly four fields, and there must be exactly one space between
  2796. each  field.   Comments  may  be added after the last field. Comment lines are
  2797. begun with "#" in column one.
  2798.  
  2799. a. "username" is the user's login name.
  2800.  
  2801. b.  "password" is the required password.  Note  that  this  is  in  plaintext;
  2802. therefore  it  is  not a good idea to give general read permission to the root
  2803. directory.  A password of "*" (a single asterisk) means that any  password  is
  2804. acceptable.
  2805.  
  2806. c.  "/path" is the allowable prefix on accessible files.  Before any  file  or
  2807. directory  operation,  the current directory and the user- specified file name
  2808. are joined to form an absolute path name in "canonical"  form  (i.e.,  a  full
  2809. path  name  starting  at  the root, with "./" and "../" references, as well as
  2810. redundant /'s, recognized and removed). The result MUST begin with the  allow-
  2811. able  path  prefix;  if  not, the operation is denied.  NB! Under MS-DOS, this
  2812. field must use backslashes ("/"), NOT forward slashes ("/").  This field  must
  2813. always begin with a "/", i.e., at the root directory.
  2814.  
  2815. d.  "permissions" is a decimal number granting permission for read, create and
  2816. write  operations.   If the low order bit (0x1) is set, the user is allowed to
  2817. read a file subject to the path name prefix  restriction.   If  the  next  bit
  2818. (0x2)  is  set,  the  user  is  allowed  to  create  a new file if it does not
  2819. overwrite an existing file.  If the third  bit  (0x4)  is  set,  the  user  is
  2820. allowed  to  write a file even if it overwrites an existing file, and in addi-
  2821. tion he may delete files.  Again, all operations are allowed  subject  to  the
  2822. path name prefix restrictions. Permissions may be combined by adding bits, for
  2823. example, 0x3 (= 0x2 + 0x1) means that the user is given read and  create  per-
  2824. mission, but not overwrite/delete permission.
  2825.  
  2826. For example, suppose /ftpusers on machine "pc.ka9q.ampr" contains the line
  2827.  
  2828.         friendly test /testdir 7
  2829.  
  2830.  
  2831. A session using this account would look like this:
  2832.  
  2833.         net> ftp pc.ka9q.ampr
  2834.         SYN Sent
  2835.         Established
  2836.         250 pc.ka9q.ampr FTP version 871225.5 ready at Wed Jan 20 16:27:18 1988
  2837.         user friendly
  2838.         331 Enter PASS command
  2839.         pass test
  2840.         230 Logged in
  2841.  
  2842.  
  2843. The user now has read, write, overwrite and delete  privileges  for  any  file
  2844. under /testdir; he may not access any other files.
  2845.  
  2846. Here are some more sample entries in /ftpusers:
  2847.  
  2848.  
  2849.         karn foobar / 7         # User "karn" with password "foobar" may read,
  2850.                                 # write, overwrite and delete any file on the
  2851.                                 # system.
  2852.  
  2853.         guest bletch /g/bogus 3 # User "guest" with password "bletch" may read
  2854.                                 # any file under /g/bogus and its subdirectories,
  2855.                                 # and may create a new file as long as it does
  2856.                                 # not overwrite an existing file. He may NOT
  2857.                                 # delete any files.
  2858.  
  2859.         anonymous * /public 1   # User "anonymous" (any password) may read files
  2860.                                 # under /public and its subdirectories; he may
  2861.                                 # not create, overwrite or delete any files.
  2862.  
  2863.  
  2864. I recommend this last entry as a standard convention for keeping a  repository
  2865. of  downloadable  files;  in  particular, the username "anonymous" is an esta-
  2866. blished ARPA convention.
  2867.  
  2868. 4.2.  The BM.EXE Mail User Interface Program
  2869.  
  2870. Many thanks to Gerard PA0GRI who is primarily responsible for the addition  of
  2871. features  to  version  2,  and  to Dave Trulli NN2Z who is responsible for the
  2872. changes and additions making up version 3.
  2873.  
  2874. 4.2.1.  Configuring the SMTP Environment
  2875.  
  2876. As supplied, the SMTP server and client make assumptions about the disk  space
  2877. available to them.  In particular, the file handling portion of the client and
  2878. server will need to be modified heavily if used on any operating system  other
  2879. than PC-Dos or MS-Dos.  Sorry.
  2880.  
  2881. To achieve minimum functionality, you should  create  directories  /spool/mail
  2882. and  /spool/mqueue  on  the default disk used when running net.exe... the mail
  2883. directory is used by the server for storing incoming mail, the  mqueue  direc-
  2884. tory  is  where  the  client  looks  to find outbound messages that need to be
  2885. delivered.
  2886.  
  2887. There is one command in net.exe that relates to the SMTP client operation.  It
  2888. is  'smtp'.   Issuing this command will cause the client to attempt to deliver
  2889. mail immediately.  Normally, the client will fire up 15mins after the  end  of
  2890. the previous invocation to try and process outbound mail.  The smtp command is
  2891. primarily a debugging tool, and should be used as such.
  2892.  
  2893. 4.2.1.1.  File Formats
  2894.  
  2895. Incoming mail for users on the current host gets placed in 'mailbox' files  in
  2896. the  /spool/mail  directory.   The  name of the file is based on the user name
  2897. given by the sending SMTP agent.  These are simple text files, with  new  mes-
  2898. sages  appended to the end.  If a mailbox file does not exist, the server will
  2899. create it automagically.  Messages in the files are in RFC822 format, with new
  2900. messages  appended  to  the  end.   The first line of each message will always
  2901. start with the token 'Received:', quotes not included.  This line is added  by
  2902. the  server  to  indicate  the date and time the message was received, and the
  2903. host it was received from.
  2904.  
  2905. Outgoing mail messages consist of two files each in the  /spool/mqueue  direc-
  2906. tory.   The  names  of  the  two  files  will be of the form <integer>.WRK and
  2907. <integer>.TXT, where integer is the sequence number of the message relative to
  2908. this  machine.   The  file  sequence.seq  in the mqueue directory contains the
  2909. current sequence number for reference by the mail user  interface.   The  .TXT
  2910. file contains the data portion of the SMTP transaction, in full RFC822 format.
  2911. The .WRK file consists of 3 lines, as follows:
  2912.  
  2913. o+    the hostname of the destination system
  2914.  
  2915. o+    the full sender address, in user@host format.
  2916.  
  2917. o+    the full destination address, in user@host format.
  2918.  
  2919. The mailer does not yet support multiple recipients; when it  does,  the  .wrk
  2920. file  format  will contain extra destination address lines, one for each addi-
  2921. tional recipient.
  2922.  
  2923. 4.2.1.2.  Bugs and Limitations:
  2924.  
  2925. The SMTP server does not allow forwarding.  In a perfect world, forwarding  is
  2926. a  crock.   Since  we do not live in a perfect world, some specialized forward
  2927. capability will probably be added eventually... though we'd like to avoid  it!
  2928.  
  2929. Better  to  just  put  a  bsd4.X system on the air and let Sendmail handle the
  2930. grody work!  :-)
  2931.  
  2932. The SMTP client only understands a single destination address in the TO  line.
  2933. This  is  a  legal minimal implementation of the standard, but will eventually
  2934. change.  Note that the format of the .WRK file will change when this does,  of
  2935. necessity.
  2936.  
  2937. Error returns from the remote server are not properly handled. The mailer will
  2938. keep  trying  to  deliver  the  mail  each time the smtp command is issued (or
  2939. invoked automatically by the timer).  There is as yet no mechanism for "bounc-
  2940. ing" mail back to the sender when it cannot be sent.
  2941.  
  2942. The smtp client (mail sender) code in net.exe now tries to connect to all des-
  2943. tination  hosts  simultaneously.  If  there  is  a lot of mail in the outbound
  2944. queue, this may cause problems. In particular, try using the FILES=  parameter
  2945. in the MS-DOS config.sys file to allow net.exe to have more than the default 8
  2946. files open at once.
  2947.  
  2948. 4.2.1.3.  For More Information
  2949.  
  2950. The SMTP specification is RFC821.  The Format for text messages (including the
  2951. headers) is in RFC822.  RFC819 discusses hostname naming conventions, particu-
  2952. larly domain naming.
  2953.  
  2954. 4.2.2.  BM Setup
  2955.  
  2956. In order to make use of BM, you must first follow  the  installation  instruc-
  2957. tions in the file SMTP.DOC to provide minimal SMTP support.  Then, you should:
  2958.  
  2959. o+    copy the files BM.RC and HOSTS.NET to the root directory of  the  default
  2960.      drive used when NET.EXE is running.
  2961.  
  2962. o+    edit HOSTS.NET to reflect the hosts you will  exchange  mail  with.   the
  2963.      format of each line of this file is:
  2964.  
  2965.              IP_address <tab> hostname <newline>
  2966.  
  2967.      The IP address should be of the form 0.0.0.0, and the hostname can be any
  2968.      token you wish to use to represent that host.  In particular, it does NOT
  2969.      need to be the full legal name of the host.
  2970.  
  2971. o+    edit the file /BM.RC to correctly identify your hostname,  username,  and
  2972.      the IP address of the system you wish to punt mail to when you don't know
  2973.      the correct IP address.  The format lines in this file is:
  2974.  
  2975.              token <space> value <newline>
  2976.  
  2977.      where the currently defined tokens are 'host' for this system's hostname,
  2978.      'user'  for  your  username, and 'gate' for the ip address of the nearest
  2979.      'smart mailer'.  More on this below.  Additional tokens exist for setting
  2980.      your local timezone, and mailbox directory, and editor to be used in mes-
  2981.      sage creation.
  2982.  
  2983. 4.2.3.  Operation
  2984.  
  2985. BM is designed to serve as the mail  user-interface  for  users  of  the  KA9Q
  2986. internetworking  software package.  The purpose of BM is to provide a full set
  2987. of electronic mail services to the  user.   These  include  sending  messages,
  2988. listing and reading received messages, and so forth.
  2989.  
  2990. BM reads mailbox files created by the SMTP server in NET.EXE, which are stored
  2991. in  a  directory  (usually  /spool/mail)  that is specified in the config file
  2992. /bm.rc.  Incoming mail is stored by the server in mailbox files, one per user-
  2993. name.   These  mailbox  files  may  also  be  referred to as "notefiles".  The
  2994. default mailbox to read is specified with the  'user'  option  in  the  /bm.rc
  2995. file.  This username is also used on all outgoing messages.
  2996.  
  2997. The /bm.rc file also defines a timezone stamp, which in conjunction  with  the
  2998. DOS date and time is used to provide the required RFC822 Date: header.
  2999.  
  3000. Commands are generally one character long and followed by a space, and parame-
  3001. ter if needed:
  3002.  
  3003. s  Send a message.  The user is prompted for a destination  address  and  sub-
  3004.    ject.   BM then creates appropriate RFC822 headers in a temporary file, and
  3005.    either invokes the user's favorite editor (specified with the 'edit' param-
  3006.    eter  in  /bm.rc)  to  enter the message text, or uses a simple/stupid text
  3007.    entry routine if no editor is defined.  Note that if you are using an  edi-
  3008.    tor,  you  should start by jumping to the end of the file.  RFC822 requires
  3009.    that the headers be first and be separated from the text of a message by at
  3010.    least one blank line.
  3011.  
  3012.    In this release, Phil KA9Q has modified BM slightly to  be  more  like  the
  3013.    Berkeley  Unix  mail program.  When the message entry routine first starts,
  3014.    you will be in the silly text editor.  If you want to use  your  editor  on
  3015.    the  message, type '~e<ret>'... not obvious to most folks, but very obvious
  3016.    to 4bsd fans... [sigh].
  3017.  
  3018. t  Transmits an already  created  file  as  a  message.   RFC822  headers  are
  3019.    prepended.   This is useful if you don't have an editor that will work with
  3020.    the 's' command.
  3021.  
  3022.    *** NOTE ***  RFC822 only allows 7bit data.  If you want to send a
  3023.                  binary file, use BSQ, or UUENCODE, or something similar
  3024.             to convert  it  to  a  text  file  first!   Better  yet,  use
  3025.    FTP...
  3026.  
  3027. r  Read all messages in the current notefile.
  3028.  
  3029. u  Updates you with new messages in  the  notefile,  shows  them  to  you  and
  3030.    updates  the  read  marker to the last one read.  If no new mes- sages came
  3031.    in, you will be notified.
  3032.  
  3033. f  Forward a message to someone else.  A temporary copy is made of the message
  3034.    specified and that is handed over to the send message routine, which treats
  3035.    it as a file ala the 't' command.
  3036.  
  3037. d  Delete a message.  Parameter is the message number.  If the number  of  the
  3038.    to  be  deleted  message  is  higher than the last read message an "are you
  3039.    sure" message is printed. 'Y' or 'y' will delete it...
  3040.  
  3041. h  Displays message headers, a message number, received date,  from  whom  and
  3042.    the  subject fields on an single line.  An star is put in front of the last
  3043.    read message.
  3044.  
  3045. p   Sets the printer on or off so messages  to  the  screen  also  go  to  the
  3046.    printer.  ** This will be implemented in a future release. **
  3047.  
  3048. l  Lists the file names of messages waiting to be sent that are in  the  queue
  3049.    directory, usually /spool/mqueue.  Primarily useful for debugging.
  3050.  
  3051. n  Shows the notefiles in the mail directory, the location of which is  speci-
  3052.    fied  by  the 'smtp' parameter in the /bm.rc file.  If this command is fol-
  3053.    lowed with a parameter, the current notefile will be changed to the  speci-
  3054.    fied  notefile.  If it does not exist you will be notified if you try some-
  3055.    thing with it.
  3056.  
  3057. #  Substitute # with a number (1..whatever) and it will show you  the  message
  3058.    in  the current active notefile with that number. If the message is the one
  3059.    next to the last read one the * will be moved.
  3060.  
  3061. ?  Prints a short command summary to the screen.
  3062.  
  3063. q  Quit.
  3064.  
  3065. The program's prompt will always show the current notefile name.
  3066.  
  3067. 4.2.4.  Additional Information
  3068.  
  3069. BM will prompt you for a To: address.  This should be in the  form  user@host,
  3070. where  user  will be the name of the mailbox file on the destination KA9Q sys-
  3071. tem, or the username of the intended recipient on other SMTP-equipped systems.
  3072. The host field should exactly match a host token in the HOSTS.NET file.  If it
  3073. does not, the SMTP client in NET.EXE will insert the IP address of the nearest
  3074. "smart  mail  agent"  in  the  work file instead of the destination IP address
  3075. (since it is unknown).  The rationale behind this is that many  SMTP  equipped
  3076. systems include the ability to forward mail that is not addressed to them.  If
  3077. you have a system of this type nearby, you may be able to "punt" mail to  them
  3078. for handling.
  3079.  
  3080. Note that if there is such a smart mailer  on  a  system  near  you,  you  can
  3081. replace  the simple 'user' field with a full address that the smart mailer can
  3082. understand, since BM will scan from the  right  taking  everything  after  the
  3083. rightmost  '@'  to  be  the  host token, and will not mangle the address.  For
  3084. example, from my PC clone I can easily mail to:
  3085.  
  3086.         bellcore!karn@winfree            (to get to Phil, KA9Q)
  3087.  
  3088.  
  3089. where winfree is my Unix system, which talks to system bellcore via UUCP.   BM
  3090. really  doesn't  care what you put for an address as long as there is a system
  3091. within range that it can punt to when it doesn't  understand  what  you  mean.
  3092. Note that this implies you should be extra careful when typing addresses!
  3093.  
  3094. Read the SMTP.DOC file for specification of the queue and mailbox  files,  and
  3095. limitations of the SMTP client that affect BM's capabilities.
  3096.  
  3097. 5.  Appendices
  3098.  
  3099. 5.1.  Technical Information for Client/Server Developers
  3100.  
  3101. This section describes the "guts" of the Internet package for the  benefit  of
  3102. programmers  who  wish  to  write their own applications, or adapt the code to
  3103. different hardware environments.
  3104.  
  3105. The code as distributed includes both the functions of an IP packet switch and
  3106. an  end-host  system,  including several servers. The implementation is highly
  3107. modular, however. For example, if one wants to build a dedicated packet switch
  3108. without  any  local applications, the various applications and the TCP and UDP
  3109. modules may easily be omitted to save space.
  3110.  
  3111. The package allows multiple simultaneous applications, each supporting  multi-
  3112. ple  simultaneous  users,  each using TCP and/or UDP. The only limit is memory
  3113. space, which is getting quite tight on the 820; the C compiler for the IBM  PC
  3114. seems  to  generate  much more compact code (typically 1/2 as large as for the
  3115. Z-80) so the PC seems more promising as a large-scale server.
  3116.  
  3117. 5.1.1.  Data Structures
  3118.  
  3119. To increase portability, the pseudo-types "int16" and "int32" are used to mean
  3120. an  unsigned  16-bit integer and a signed 32-bit integer, respectively.  Ordi-
  3121. narily these types are defined in machdep.h to be "unsigned int" and "long".
  3122.  
  3123. The various modules pass data in chained structures  called  mbufs,  with  the
  3124. following format:
  3125.  
  3126. struct mbuf {
  3127.         struct mbuf *next;      /* Links mbufs belonging to single packets */
  3128.         struct mbuf *anext;     /* Links packets on queues */
  3129.         char *data;             /* Pointer to start of actual data in buffer */
  3130.         int16 cnt;              /* Length of data in buffer */
  3131. };
  3132.  
  3133.  
  3134. Although somewhat cumbersome to work with, mbufs make  it  possible  to  avoid
  3135. memory-to-memory copies that limit performance. For example, when user data is
  3136. transmitted it must first traverse several protocol layers before reaching the
  3137. transmitter hardware. With mbufs, each layer adds its protocol header by allo-
  3138. cating an mbuf and linking it to the head of the mbuf "chain" given it by  the
  3139. higher layer, thus avoiding several copy operations.
  3140.  
  3141. A number of primitives operating on mbufs are available in mbuf.c.   The  user
  3142. may  create,  fill,  empty  and  free  mbufs  himself  with the alloc_mbuf and
  3143. free_mbuf primitives, or at the cost of a single memory-to-memory copy  he  he
  3144. may use the more convenient qdata() and dqdata() primitives.
  3145.  
  3146. 5.1.2.  Timer Services
  3147.  
  3148. TCP and IP require timers. A timer package  is  included,  so  the  user  must
  3149. arrange to call the single entry point "tick" on a regular basis. The constant
  3150. MSPTICK in timer.h should be defined as the interval  between  ticks  in  mil-
  3151. liseconds. One second resolution is adequate. Since it can trigger a consider-
  3152. able amount of activity, including upcalls to user level, "tick" should not be
  3153. called  from  an  interrupt handler. A clock interrupt should set a flag which
  3154. will then cause "tick" to be called at user level.
  3155.  
  3156. 5.1.3.  Internet Type-of-Service
  3157.  
  3158. One of the features of the Internet  is  the  ability  to  specify  precedence
  3159. (i.e.,  priority)  on  a per-datagram basis. There are 8 levels of precedence,
  3160. with the bottom 6 defined by the DoD as Routine, Priority,  Immediate,  Flash,
  3161. Flash  Override  and  CRITICAL.  (Two  more are available for internal network
  3162. functions). For amateur use we can use the lower  four  as  Routine,  Welfare,
  3163. Priority  and  Emergency. Three more bits specify class of service, indicating
  3164. that especially high reliability, high throughput or low delay is  needed  for
  3165. this connection. Constants for this field are defined in internet.h.
  3166.  
  3167. 5.1.4.  The Internet Protocol Implementation
  3168.  
  3169. While the user does not ordinarily see this level directly,  it  is  described
  3170. here  for sake of completeness. Readers interested only in the interfaces seen
  3171. by the applications programmer should skip to the TCP and UDP sections.
  3172.  
  3173. The IP implementation consists of three major functions: ip_route, ip_send and
  3174. ip_recv.
  3175.  
  3176. 5.1.5.  IP Gateway (Packet Router) Support
  3177.  
  3178. The first, ip_route, is the IP packet switch. It takes a  single  argument,  a
  3179. pointer to the mbuf containing the IP datagram:
  3180.  
  3181.         void
  3182.         ip_route(bp,rxbroadcast)
  3183.         struct mbuf *bp;        /* Datagram pointer */
  3184.         int rxbroadcast;        /* Don't forward */
  3185.  
  3186.  
  3187. All IP datagrams, coming or going, pass through this  function.  After  option
  3188. processing,  if  any,  the  datagram's destination address is extracted. If it
  3189. corresponds to the local host, it is "kicked upstairs" to the upper half of IP
  3190. and  thence to the appropriate protocol module. Otherwise, an internal routing
  3191. table consulted to determine where the  datagram  should  be  forwarded.   The
  3192. routing  table  uses  hashing  keyed on IP destination addresses, called "tar-
  3193. gets". If the target address is not  found,  a  special  "default"  entry,  if
  3194. available,  is used. If a default entry is not available either, an ICMP "Des-
  3195. tination Unreachable" message containing the offending IP header  is  returned
  3196. to the sender.
  3197.  
  3198. The "rxbroadcast" flag is used to prevent forwarding of broadcast  packets,  a
  3199. practice which might otherwise result in spectacular routing loops. Any subnet
  3200. interface driver receiving a packet addressed to the broadcast address  within
  3201. that  subnet  MUST  set  this flag.  All other packets (including locally ori-
  3202. ginated packets) should have "rxbroadcast" set to zero.
  3203.  
  3204. ip_route ignores the IP destination address in broadcast packets, passing them
  3205. up  to the appropriate higher level protocol which is also made aware of their
  3206. broadcast nature. (TCP and ICMP ignore them; only UDP can accept them).
  3207.  
  3208. Entries are added to the IP routing table with the rt_add function:
  3209.  
  3210. int
  3211. rt_add(target,gateway,metric,interface)
  3212. int32 target;                   /* IP address of target */
  3213. int32 gateway;                  /* IP addr of gateway to reach this target */
  3214. int metric;                     /* "cost" metric, for routing decisions */
  3215. struct interface *interface;    /* device interface structure */
  3216.  
  3217.  
  3218. "target" is the IP address of the destination; it becomes the hash  index  key
  3219. for subsequent packet destination address lookups. If target == 0, the default
  3220. entry is modified. "metric" is simply stored in the table; it is available for
  3221. routing  cost  calculations  when  an  automatic  routing protocol is written.
  3222. "interface" is the address of a control structure for the particular device to
  3223. which  the  datagram  should  be sent; it is defined in the section "IP Inter-
  3224. faces".
  3225.  
  3226. rt_add returns 0 on success, -1 on failure (e.g., out of memory).
  3227.  
  3228. To remove an entry from the routing table, only the  target  address  need  be
  3229. specified to the rt_drop call:
  3230.  
  3231.         int
  3232.         rt_drop(target)
  3233.         int32 target;
  3234.  
  3235.  
  3236. rt_drop returns 0 on success, -1 if the target could not be found.
  3237.  
  3238. 5.1.6.  IP Interfaces
  3239.  
  3240. Every lower level interface used to transmit IP datagrams must have an "inter-
  3241. face" structure, defined as follows:
  3242.  
  3243. /* Interface control structure */
  3244. struct interface {
  3245.         struct interface *next; /* Linked list pointer */
  3246.         char *name;             /* Ascii string with interface name */
  3247.         int16 mtu;              /* Maximum transmission unit size */
  3248.         int (*send)();          /* Routine to call to send datagram */
  3249.         int (*output)();        /* Routine to call to send raw packet */
  3250.         int (*recv)();          /* Routine to kick to process input */
  3251.         int (*stop)();          /* Routine to call before detaching */
  3252.         int16 dev;              /* Subdevice number to pass to send */
  3253.         int16 flags;            /* State of interface */
  3254. #define IF_ACTIVE       0x01
  3255. #define IF_BROADCAST    0x04    /* Interface is capable of broadcasting */
  3256. };
  3257.  
  3258.  
  3259. Part of the interface structure is for the private use of the  device  driver.
  3260. "dev"  is  used to distinguish between one of several identical devices (e.g.,
  3261. serial links or radio channels) that might share the same send routine.
  3262.  
  3263. A pointer to this structure kept in the  routing  table.  Two  fields  in  the
  3264. interface  structure  are  examined by ip_route: "mtu" and "send". The maximum
  3265. transmission unit size represents the largest datagram that  this  device  can
  3266. handle; ip_route will do IP-level fragmentation as required to meet this limit
  3267. before calling "send", the function to  queue  datagrams  on  this  interface.
  3268. "send" is called as follows:
  3269.  
  3270. (*send)(bp,interface,gateway,precedence,delay,throughput,reliability)
  3271. struct mbuf *bp;                /* Pointer to datagram */
  3272. struct interface *interface;    /* Interface structure */
  3273. int32 gateway;                  /* IP address of gateway */
  3274. char precedence;                /* TOS bits from IP header */
  3275. char delay;
  3276. char throughput;
  3277. char reliability;
  3278.  
  3279.  
  3280. The "interface" and "gateway" arguments are kept  in  the  routing  table  and
  3281. passed on each call to the send routine. The interface pointer is passed again
  3282. because several interfaces might share the same output driver  (e.g.,  several
  3283. identical  physical channels).  "gateway" is the IP address of the neighboring
  3284. IP gateway on the other end of the link; if a link-level address is  required,
  3285. the  send  routine  must  map  this address either dynamically (e.g., with the
  3286. Address Resolution Protocol, ARP) or with a static lookup table.  If the  link
  3287. is  point-to-point, link-level addresses are unnecessary, and the send routine
  3288. can therefore ignore the gateway address.
  3289.  
  3290. The Internet Type-of-Service (TOS) bits are passed to the interface driver  as
  3291. separate arguments. If tradeoffs exist within the subnet between these various
  3292. classes of service, the driver may use these arguments to control them  (e.g.,
  3293. optional use of link level acknowledgments, priority queuing, etc.)
  3294.  
  3295. It is expected that the send routine will put a link level header on the front
  3296. of  the  packet, add it an internal output queue, start output (if not already
  3297. active) and return. It must NOT busy-wait for completion (unless it is a  very
  3298. fast device, e.g., Ethernet) since that blocks the entire system.
  3299.  
  3300. Any interface that uses ARP must also provide an "output"  routine.  It  is  a
  3301. lower  level  entry  point that allows the caller to specify the fields in the
  3302. link header. ARP uses it to broadcast a request for a given IP address. It may
  3303. be  the  same  routine used internally by the driver to send IP datagrams once
  3304. the link level fields have been determined. It is called as follows:
  3305.  
  3306. (*output)(interface,dest,src,type,bp)
  3307. struct interface *interface;    /* Pointer to interface structure */
  3308. char dest[];                    /* Link level destination address */
  3309. char src[];                     /* Link level source address */
  3310. int16 type;                     /* Protocol type field for link level */
  3311. struct mbuf *bp;                /* Data field (IP datagram) */
  3312.  
  3313.  
  3314. 5.1.7.  IP Host Support
  3315.  
  3316. All of the modules described thus far are required in  all  systems.  However,
  3317. the  routines  that  follow  are  necessary  only  if the system is to support
  3318. higher-level applications. In a stand alone IP gateway (packet switch) without
  3319. servers  or clients, the following modules (IP user level, TCP and UDP) may be
  3320. omitted to allow additional space for buffering; define the flag  GWONLY  when
  3321. compiling iproute.c to avoid referencing the user level half of IP.
  3322.  
  3323. The following function is called by iproute() whenever a datagram arrives that
  3324. is addressed to the local system.
  3325.  
  3326. void
  3327. ip_recv(bp,rxbroadcast)
  3328. struct mbuf *bp;                /* Datagram */
  3329. char rxbroadcast;               /* Incoming broadcast */
  3330.  
  3331.  
  3332. ip_recv reassembles IP datagram fragments, if necessary, and calls  the  input
  3333. function  of  the  next  layer  protocol (e.g., tcp_input, udp_input) with the
  3334. appropriate arguments, as follows:
  3335.  
  3336. (*protrecv)(bp,protocol,source,dest,tos,length,rxbroadcast);
  3337. struct mbuf *bp;        /* Pointer to packet minus IP header */
  3338. char protocol;          /* IP protocol ID */
  3339. int32 source;           /* IP address of sender */
  3340. int32 dest;             /* IP address of destination (i.e,. us) */
  3341. char tos;               /* IP type-of-service field in datagram */
  3342. int16 length;           /* Length of datagram minus IP header */
  3343. char rxbroadcast;       /* Incoming broadcast */
  3344.  
  3345.  
  3346. The list of protocols is contained in a  switch()  statement  in  the  ip_recv
  3347. function. If the protocol is unsupported, an ICMP Protocol Unreachable message
  3348. is returned to the sender unless the packet came in as a broadcast.
  3349.  
  3350. Higher level protocols such as TCP and UDP use the ip_send routine to generate
  3351. IP datagrams. The arguments to ip_send correspond directly to fields in the IP
  3352. header, which is generated and put in front of the user's  data  before  being
  3353. handed to ip_route:
  3354.  
  3355. ip_send(source,dest,protocol,tos,ttl,bp,length,id,df)
  3356. int32 source;           /* source address */
  3357. int32 dest;             /* Destination address */
  3358. char protocol;          /* Protocol */
  3359. char tos;               /* Type of service */
  3360. char ttl;               /* Time-to-live */
  3361. struct mbuf *bp;        /* Data portion of datagram */
  3362. int16 length;           /* Optional length of data portion */
  3363. int16 id;               /* Optional identification */
  3364. char df;                /* Don't-fragment flag */
  3365.  
  3366.  
  3367. This interface is modeled very closely after the example given on page  32  of
  3368. RFC-791.  Zeros  may be passed for id or ttl, and system defaults will be pro-
  3369. vided. If zero is passed for length, it will be calculated automatically.
  3370.  
  3371. 5.1.8.  The Transmission Control Protocol (TCP)
  3372.  
  3373. A TCP connection is uniquely identified by  the  concatenation  of  local  and
  3374. remote  "sockets".  In  turn,  a  socket  consists of a host address (a 32-bit
  3375. integer) and a TCP port (a 16-bit integer), defined by the C structure
  3376.  
  3377. struct socket {
  3378.         long address;   /* 32-bit IP address */
  3379.         short port;     /*16-bit TCP port */
  3380. };
  3381.  
  3382.  
  3383. It is therefore possible to have several simultaneous but distinct connections
  3384. to  the  same  port on a given machine, as long as the remote sockets are dis-
  3385. tinct. Port numbers are assigned either through mutual agreement, or more com-
  3386. monly  when  a  "standard" service is involved, as a "well known port" number.
  3387. For example,  to  obtain  standard  remote  login  service  using  the  TELNET
  3388. presentation-layer  protocol,  by  convention you initiate a connection to TCP
  3389. port 23; to send mail using the Simple Mail Transfer Protocol (SMTP) you  con-
  3390. nect  to  port 25. ARPA maintains port number lists and periodically publishes
  3391. them; the latest revision is RFC-960,  "Assigned  Numbers".   They  will  also
  3392. assign  port  numbers  to  a new application on request if it appears to be of
  3393. general interest.
  3394.  
  3395. TCP connections are best modeled as a pair  of  one-way  paths  (one  in  each
  3396. direction) rather than single full-duplex paths. A TCP "close" really means "I
  3397. have no more data to send". Station A may close its path to station B  leaving
  3398. the  reverse  path  from  B  to A unaffected; B may continue to send data to A
  3399. indefinitely until it too closes its half of the  connection.   Even  after  a
  3400. user initiates a close, TCP continues to retransmit any unacknowledged data if
  3401. necessary to ensure that it reaches the other end. This is known as  "graceful
  3402. close" and greatly simplifies certain applications such as FTP.
  3403.  
  3404. This package is written as a "module" intended to be compiled and linked  with
  3405. the application(s) so that they can be run as one program on the same machine.
  3406. This greatly simplifies the user/TCP interface, which becomes just  a  set  of
  3407. internal  subroutine  calls on a single machine. The internal TCP state (e.g.,
  3408. the address  of  the  remote  station)  is  easily  accessed.  Reliability  is
  3409. improved,  since  any  hardware  failure  that  kills TCP will likely take its
  3410. applications with it anyway. Only IP datagrams flow out of the machine  across
  3411. hardware  interfaces  (such  as asynch RS-232 ports or whatever else is avail-
  3412. able) so hardware flow control or  complicated  host/front-end  protocols  are
  3413. unnecessary.
  3414.  
  3415. The TCP supports five basic operations on a  connection:  open_tcp,  send_tcp,
  3416. receive_tcp, close_tcp and del_tcp. A sixth, state_tcp, is provided mainly for
  3417. debugging. Since this TCP module cannot assume the presence of a  sleep/wakeup
  3418. facility from the underlying operating system, functions that would ordinarily
  3419. block (e.g., recv_tcp when no data is available) instead set net_error to  the
  3420. constant  EWOULDBLK  and  immediately return -1.  Asynchronous notification of
  3421. events such as data arrival  can  be  obtained  through  the  upcall  facility
  3422. described earlier.
  3423.  
  3424. Each TCP function is summarized in the following section  in  the  form  of  C
  3425. declarations and descriptions of each argument.
  3426.  
  3427. int net_error;
  3428.  
  3429.  
  3430. This global variable stores the specific cause of an error from one of the TCP
  3431. or UDP functions. All functions returning integers (i.e., all except open_tcp)
  3432. return -1 in the event of an error, and net_error should be examined to deter-
  3433. mine  the  cause.  The  possible errors are defined as constants in the header
  3434. file netuser.h.
  3435.  
  3436. /* Open a TCP connection */
  3437. struct tcb *
  3438. open_tcp(lsocket,fsocket,mode,window,r_upcall,t_upcall,s_upcall,tos,user)
  3439. struct socket *lsocket; /* Local socket */
  3440. struct socket *fsocket; /* Remote socket */
  3441. int mode;               /* Active/passive/server */
  3442. int16 window;           /* Receive window (and send buffer) sizes */
  3443. void (*r_upcall)();     /* Function to call when data arrives */
  3444. void (*t_upcall)();     /* Function to call when ok to send more data */
  3445. void (*s_upcall)();     /* Function to call when connection state changes */
  3446. char tos;               /* Internet Type-of-Service */
  3447. int *user;              /* Pointer for convenience of user */
  3448.  
  3449.  
  3450. "lsocket" and "fsocket" are pointers to the local and foreign sockets, respec-
  3451. tively.
  3452.  
  3453. "mode" may take on three  values,  all  defined  in  net.user.h.  If  mode  is
  3454. TCP_PASSIVE, no packets are sent, but a TCP control block is created that will
  3455. accept a subsequent active open from another TCP. If a specific foreign socket
  3456. is  passed  to  a  passive  open, then connect requests from any other foreign
  3457. socket will be rejected. If the foreign socket fields are set to zero,  or  if
  3458. fsocket  is  NULLSOCK,  then  connect requests from any foreign socket will be
  3459. accepted.  If mode is TCP_ACTIVE, TCP will initiate a connection to  a  remote
  3460. socket  that must already have been created in the LISTEN state by its client.
  3461. The foreign socket must be completely specified in an active open.  When  mode
  3462. is TCP_SERVER, open_tcp behaves as though TCP_PASSIVE was given except that an
  3463. internal "clone" flag is set. When a connection request comes in, a fresh copy
  3464. of  the  TCP  control  block  is created and the original is left intact. This
  3465. allows multiple sessions to exist simultaneously;  if  TCP_PASSIVE  were  used
  3466. instead only the first connect request would be accepted.
  3467.  
  3468. "r_upcall", "t_upcall" and  "s_upcall"  provide  optional  upcall  or  pseudo-
  3469. interrupt  mechanisms  useful  when running in a non operating system environ-
  3470. ment.  Each of the three arguments, if non-NULL, is taken as the address of  a
  3471. user-supplied function to call when receive data arrives, transmit queue space
  3472. becomes available, or the connection state changes. The  three  functions  are
  3473. called with the following arguments:
  3474.  
  3475. (*r_upcall)(tcb,count); /* count == number of bytes in receive queue */
  3476. (*t_upcall)(tcb,avail); /* avail == space available in send queue */
  3477. (*s_upcall)(tcb,oldstate,newstate);
  3478.  
  3479.  
  3480.      Note: whenever a single event invokes more than one upcall the order
  3481.      in  which  the upcalls are made is not strictly defined. In general,
  3482.      though, the Principle of Least Astonishment is followed.  E.g., when
  3483.      entering  the  ESTABLISHED state, the state change upcall is invoked
  3484.      first, followed by the transmit upcall.  When  an  incoming  segment
  3485.      contains  both  data  and  FIN, the receive upcall is invoked first,
  3486.      followed by the state change to CLOSE_WAIT state.  In this case, the
  3487.      user may interpret this state change as a "end of file" indicator.
  3488.  
  3489. "tos" is the Internet type-of-service field. This parameter is passed along to
  3490. IP  and is included in every datagram. The actual precedence value used is the
  3491. higher of the two specified in the corresponding pair of open_tcp calls.
  3492.  
  3493. open_tcp returns a pointer to an internal Transmission  Control  Block  (tcb).
  3494. This "magic cookie" must be passed back as the first argument to all other TCP
  3495. calls. In event of error, the NULL pointer (0) is returned  and  net_error  is
  3496. set to the reason for the error.
  3497.  
  3498. The only limit on the number of TCBs that may exist at  any  time  (i.e.,  the
  3499. number  of  simultaneous  connections)  is  the  amount  of free memory on the
  3500. machine. Each TCB on a 16-bit processor currently takes up  111  bytes;  addi-
  3501. tional  memory  is consumed and freed dynamically as needed to buffer send and
  3502. receive data. Deleting a TCB (see the del_tcp() call) reclaims its space.
  3503.  
  3504. /* Send data on a TCP connection */
  3505. int
  3506. send_tcp(tcb,bp)
  3507. struct tcb *tcb;        /* TCB pointer */
  3508. struct mbuf *bp;        /* Pointer to user's data mbufs */
  3509.  
  3510.  
  3511. "tcb" is the pointer returned by the  open_tcp()  call.  "bp"  points  to  the
  3512. user's  mbuf  with  data  to be sent. After being passed to send_tcp, the user
  3513. must no longer access the data buffer. TCP uses positive acknowledgments  with
  3514. retransmission  to  ensure in-order delivery, but this is largely invisible to
  3515. the user. Once the remote TCP has acknowledged the data, the  buffer  will  be
  3516. freed automatically.
  3517.  
  3518. TCP does not enforce a limit in the number of bytes that  may  be  queued  for
  3519. transmission,  but  it  is  recommended that the application not send any more
  3520. than the amount passed as "cnt" in the transmitter upcall.  The  package  uses
  3521. shared,  dynamically allocated buffers, and it is entirely possible for a mis-
  3522. behaving user task to run the system out of buffers.
  3523.  
  3524. /* Receive data on a TCP connection */
  3525. int
  3526. recv_tcp(tcb,bp,cnt)
  3527. struct tcb *tcb;
  3528. struct mbuf **bp;
  3529. int16 cnt;
  3530.  
  3531.  
  3532. recv_tcp() passes back through bp a pointer to an mbuf  chain  containing  any
  3533. available  receive  data, up to a maximum of "cnt" bytes. The actual number of
  3534. bytes received (the lesser of "cnt" and the  number  pending  on  the  receive
  3535. queue) is returned. If no data is available, net_error is set to EWOULDBLK and
  3536. -1 is returned; the r_upcall mechanism may be  used  to  determine  when  data
  3537. arrives.  (Technical  note: "r_upcall" is called whenever a PUSH or FIN bit is
  3538. seen in an incoming segment, or if the receive  window  fills.  It  is  called
  3539. before  an  ACK  is  sent back to the remote TCP, in order to give the user an
  3540. opportunity to piggyback any data in response.)
  3541.  
  3542. When the remote TCP closes its half of the connection and all  prior  incoming
  3543. data  has  been  read by the local user, subsequent calls to recv_tcp return 0
  3544. rather than -1 as an "end of transmission"  indicator.  Note  that  the  local
  3545. application  is  notified  of  a  remote close (i.e., end-of-file) by a state-
  3546. change upcall with the new state being CLOSE_WAIT; if  the  local  application
  3547. has  closed  first,  a  remote  close is indicated by a state-change upcall to
  3548. either CLOSING or TIME_WAIT state. (CLOSING state is used only  when  the  two
  3549. ends close simultaneously and their FINs cross in the mail).
  3550.  
  3551. /* Close a TCP connection */
  3552. close_tcp(tcb)
  3553. struct tcb *tcb;
  3554.  
  3555.  
  3556. This tells TCP that the local user has no more  data  to  send.  However,  the
  3557. remote TCP may continue to send data indefinitely to the local user, until the
  3558. remote user also does a close_tcp.  An attempt to send data after a  close_tcp
  3559. is an error.
  3560.  
  3561. /* Delete a TCP connection */
  3562. del_tcp(tcb)
  3563. struct tcb *tcb;
  3564.  
  3565. When the connection has been closed in both connections and all incoming  data
  3566. has been read, this call is made to cause TCP to reclaim the space taken up by
  3567. the TCP control block. Any incoming data remaining unread is lost.
  3568.  
  3569. /* Dump a TCP connection state */
  3570. state_tcp(tcb)
  3571. struct tcb *tcb;
  3572.  
  3573.  
  3574. This debugging call prints an ASCII-format dump of the TCP connection state on
  3575. the  terminal.  You need a copy of the TCP specification (ARPA RFC 793 or MIL-
  3576. STD-1778) to interpret most of the numbers.
  3577.  
  3578. 5.1.9.  The User Datagram Protocol (UDP)
  3579.  
  3580. UDP is available for simple applications not needing the services of  a  reli-
  3581. able  protocol  like TCP.  A minimum of overhead is placed on top of the "raw"
  3582. IP datagram service, consisting only of port numbers and a  checksum  covering
  3583. the UDP header and user data. Four functions are available to the UDP user.
  3584.  
  3585. /* Create a UDP control block for lsocket, so that we can queue
  3586.  * incoming datagrams.
  3587.  */
  3588. int
  3589. open_udp(lsocket,r_upcall)
  3590. struct socket *lsocket;
  3591. void (*r_upcall)();
  3592.  
  3593.  
  3594. open_udp creates a queue to accept incoming datagrams (regardless  of  source)
  3595. addressed  to "lsocket". "r_upcall" is an optional upcall mechanism to provide
  3596. the address of a function to be called as follows whenever a datagram arrives:
  3597.  
  3598. (*r_upcall)(lsocket,rcvcnt);
  3599. struct socket *lsocket;         /* Pointer to local socket */
  3600. int rcvcnt;                     /* Count of datagrams pending on queue */
  3601.  
  3602. /* Send a UDP datagram */
  3603. int
  3604. send_udp(lsocket,fsocket,tos,ttl,bp,length,id,df)
  3605. struct socket *lsocket;         /* Source socket */
  3606. struct socket *fsocket;         /* Destination socket */
  3607. char tos;                       /* Type-of-service for IP */
  3608. char ttl;                       /* Time-to-live for IP */
  3609. struct mbuf *bp;                /* Data field, if any */
  3610. int16 length;                   /* Length of data field */
  3611. int16 id;                       /* Optional ID field for IP */
  3612. char df;                        /* Don't Fragment flag for IP */
  3613.  
  3614.  
  3615. The parameters passed to send_udp  are  simply  stuffed  in  the  UDP  and  IP
  3616. headers, and the datagram is sent on its way.
  3617.  
  3618. /* Accept a waiting datagram, if available. Returns length of datagram */
  3619. int
  3620. recv_udp(lsocket,fsocket,bp)
  3621. struct socket *lsocket;         /* Local socket to receive on */
  3622. struct socket *fsocket;         /* Place to stash incoming socket */
  3623. struct mbuf **bp;               /* Place to stash data packet */
  3624.  
  3625.  
  3626. The "lsocket" pointer indicates the  socket  the  user  wishes  to  receive  a
  3627. datagram  on (a queue must have been created previously with the open_udp rou-
  3628. tine). "fsocket" is taken as the address of a socket structure to be overwrit-
  3629. ten  with  the  foreign  socket associated with the datagram being read; bp is
  3630. overwritten with a pointer to the data portion (if any) of the datagram  being
  3631. received.
  3632.  
  3633. /* Delete a UDP control block */
  3634. int
  3635. del_udp(lsocket)
  3636. struct socket *lsocket;
  3637.  
  3638.  
  3639. This function destroys any unread datagrams on a queue, and reclaims the space
  3640. taken by the queue descriptor.
  3641.  
  3642. 5.2.  The KISS Host to TNC Protocol
  3643.  
  3644. 5.2.1.  The Protocol Specification
  3645.  
  3646. 5.2.1.1.  Introduction
  3647.  
  3648. The purpose of the "Raw" (aka "KISS") TNC is to facilitate the use of  amateur
  3649. packet  radio  controllers  (TNCs)  with  host  computers, particularly in the
  3650. development of experimental protocols and multi-user servers (e.g.,  "bulletin
  3651. boards").
  3652.  
  3653. Current TNC software was written with human users in mind; unfortunately, com-
  3654. mands  and  responses  well suited for human use are ill-adapted for host com-
  3655. puter use, and vice versa. This is especially true for multi-user servers such
  3656. as  bulletin boards which must multiplex data from several network connections
  3657. across the single host/TNC link.  In addition, experimentation with  new  link
  3658. level  protocols  is greatly hampered because there may very well be no way at
  3659. all to generate or receive frames in the desired format without  reprogramming
  3660. the TNC.
  3661.  
  3662. The Raw TNC solves these problems by eliminating as much as possible from  the
  3663. TNC software, giving the attached host complete control over and access to the
  3664. contents of the HDLC frames transmitted and received over the air.  The  AX.25
  3665. protocol is removed entirely from the TNC, as are all command interpreters and
  3666. the like.  The TNC simply converts between synchronous  HDLC,  spoken  on  the
  3667. half  duplex radio channel, and a special asynchronous, full duplex frame for-
  3668. mat spoken on the host/TNC link.  Every frame received on  the  HDLC  link  is
  3669. passed intact to the host once it has been translated to the asynchronous for-
  3670. mat; likewise, asynchronous frames from the host are transmitted on the  radio
  3671. channel once they have been converted to HDLC format.
  3672.  
  3673. Of course, this means that the bulk of AX.25 (or another protocol) must now be
  3674. implemented  on  the host system. This is acceptable, however, considering the
  3675. greatly increased flexibility and reduced overall complexity that  comes  from
  3676. allowing  the  protocol to reside on the same machine with the applications to
  3677. which it is closely coupled.
  3678.  
  3679. 5.2.1.2.  Asynchronous frame format
  3680.  
  3681. The "asynchronous packet protocol" spoken between the host  and  TNC  is  very
  3682. simple,  since its only function is delimiting frames. Each frame is both pre-
  3683. ceded and followed by a special FEND (frame end) character,  analogous  to  an
  3684. HDLC flag.  No CRC or checksum is provided.
  3685.  
  3686. The reason for both preceding and ending frames with FENDs is to improve  per-
  3687. formance  when there is noise on the asynch line. The FEND at the beginning of
  3688. a frame serves to "flush out" any accumulated garbage into  a  separate  frame
  3689. (which will be discarded by the upper layer protocol) instead of prepending it
  3690. to an otherwise good frame.  As with back-to-back  FLAGs  in  HDLC,  two  FEND
  3691. characters in a row should not be interpreted as delimiting an empty frame.
  3692.  
  3693. 5.2.1.2.1.  Transparency
  3694.  
  3695. Frames are sent in 8-bit binary; if an FEND ever appears in the  data,  it  is
  3696. translated  into  the  two  byte sequence FESC TFEND (frame escape, transposed
  3697. frame end).  Likewise, if the FESC character ever appears in the user data, it
  3698. is  replaced  with  the two character sequence FESC TFESC (frame escape, tran-
  3699. sposed frame escape).
  3700.  
  3701. As characters arrive at the receiver, they are appended to a buffer containing
  3702. the  current  frame.  Receiving  a  FEND  marks  the end of the current frame.
  3703. Receipt of a FESC puts the receiver into  "escaped  mode",  which  causes  the
  3704. receiver to translate a following TFESC or TFEND back to FESC or FEND, respec-
  3705. tively, before adding it to the  receive  buffer  and  leaving  escaped  mode.
  3706. (Receipt  of  any character other than TFESC or TFEND while in escaped mode is
  3707. an error; no action is taken and frame assembly continues.  A  TFEND  or  TESC
  3708. received while not in escaped mode is treated as an ordinary data character.)
  3709.  
  3710. This procedure may seem somewhat complicated, but it is easy to implement  and
  3711. recovers  quickly from errors. In particular, the FEND character is never sent
  3712. over the channel except as an actual  end-of-frame  indication.  This  ensures
  3713. that  any  intact frame (properly delimited by FEND characters) will always be
  3714. received properly regardless of the starting state of the receiver or  corrup-
  3715. tion of the preceding frame.
  3716.  
  3717. The special characters are:
  3718.  
  3719.         FEND    (frame end)                     300 (octal)
  3720.         FESC    (frame escape)                  333 (octal)
  3721.         TFEND   (transposed frame end)          334 (octal)
  3722.         TFESC   (transposed frame escape)       335 (octal)
  3723.  
  3724. (ARPA Internet hackers will recognize this protocol as identical  to  SLIP,  a
  3725. popular method for sending IP datagrams across ordinary dialup modems).
  3726.  
  3727. 5.2.1.3.  Control of the Raw TNC
  3728.  
  3729. Each asynchronous data frame sent to the TNC is  converted  back  into  "pure"
  3730. form  and queued for transmission as a separate HDLC frame.  Although removing
  3731. the human interface and the AX.25 protocol from the TNC  makes  most  existing
  3732. TNC  commands unnecessary (i.e., they become host functions), the TNC is still
  3733. responsible for keying the transmitter's  PTT  line  and  deferring  to  other
  3734. activity  on the radio channel. It is therefore necessary to allow the host to
  3735. control a few TNC parameters, namely  the  transmitter  keyup  delay  and  the
  3736. transmitter persistence variables.
  3737.  
  3738. It is therefore necessary to distinguish between command and  data  frames  on
  3739. the  host/TNC  link. This is done by defining the first byte of each asynchro-
  3740. nous frame between host and TNC as a "type" indicator.   The  following  types
  3741. are defined in frames to the TNC:
  3742.  
  3743. Type    Function        Comments
  3744. 0       Data frame      Rest of frame is data to be sent on the HDLC channel
  3745. 1       TXDELAY         Second byte is transmitter keyup delay in 10 ms units
  3746. 2       P               Second byte of frame is persistence parameter, p:
  3747.                         0: p = (0+1)/256, 255: p = (255+1)/256 = 1.0
  3748. 3       SLOTTIME        Second byte of frame is slot interval in 10 ms units
  3749. 4       TXtail          Second byte of frame is time to hold up the TX after
  3750.                         the FCS has been sent (the time allowed to send the
  3751.                         HDLC flag character; should be at least 2 for 1200 bps
  3752.                         operation).  In 10 ms units.
  3753.  
  3754.  
  3755. The following types are defined in frames to the host:
  3756.  
  3757. Type    Function        Comments
  3758. 0       Data frame      Rest of frame is data from the HDLC channel
  3759.  
  3760.  
  3761. (No other types are defined; in particular, there is  no  provision  for  ack-
  3762. nowledging data or command frames sent to the TNC.)
  3763.  
  3764. 5.2.1.4.  Persistence
  3765.  
  3766. The P and SLOTTIME parameters are used to implement  true  p-persistent  CSMA.
  3767. This works as follows:
  3768.  
  3769. Whenever the host has queued data for transmission, the TNC begins  monitoring
  3770. the  carrier detect signal from the modem. It waits indefinitely for this sig-
  3771. nal to go inactive. Once the channel is clear,  the  TNC  generates  a  random
  3772. number  between  0 and 255. If this number is less than or equal to P, the TNC
  3773. asserts the transmitter PTT line, waits .01 * TXDELAY seconds,  and  transmits
  3774. all  frames  in its queue. The TNC then releases PTT and goes back to the idle
  3775. state.  If the random number is greater than  P, the  TNC  delays  signal  has
  3776. gone  active  in the meantime, the TNC again waits for it to clear before con-
  3777. tinuing).  Note  that  P=255  means  always  transmit  as  soon  as  possible,
  3778. regardless of the random number.
  3779.  
  3780. The result is that the  TNC  waits  for  an  exponentially-distributed  random
  3781. interval  after  sensing  that the channel has gone clear before attempting to
  3782. transmit. The idea here is that with proper tuning of  the  parameters  P  and
  3783. SLOTTIME,  several  stations with traffic to send are much less likely to col-
  3784. lide with each other when they simultaneously see the channel go clear.
  3785.  
  3786. 5.2.2.  The TNC-2 Implementation
  3787.  
  3788. See the files included in the TNC-2 KISS Distribution.
  3789.  
  3790. 5.2.3.  The TNC-1 Implementation
  3791.  
  3792. See the files included in the TNC-1 KISS Distribution.
  3793.  
  3794. 5.2.4.  The VADCG/ASHBY Implementation
  3795.  
  3796. See the files included in the VADCG/ASHBY KISS Distribution.
  3797.  
  3798. 5.2.5.  The AEA Implementation
  3799.  
  3800. All PK-232 units with WEFAX, and PC-87 units of a similar vintage, are capable
  3801. of KISS operation.  See the installation instructions earlier in this document
  3802. for more information.
  3803.  
  3804. 5.2.6.  The Kantronics Implementation
  3805.  
  3806. See your Kantronics TNC Documentation.
  3807.  
  3808. 5.3.  The Experimental DES Package
  3809.  
  3810. Documentation is included in the DES package.